From MAILER-DAEMON Fri Jul 09 13:59:12 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BizeR-000843-UZ
	for mharc-bug-commoncpp@gnu.org; Fri, 09 Jul 2004 13:59:12 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BizeQ-00083y-Mj
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 13:59:10 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BizeP-00083l-Dr
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 13:59:10 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BizeP-00083i-Ai
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 13:59:09 -0400
Received: from [212.83.3.66] (helo=post.atlantis.ru)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BizcC-0000oL-Jx
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 13:56:52 -0400
Received: (from root@localhost)
	by post.atlantis.ru (8.11.6/8.11.6) id i69Gudl14522;
	Fri, 9 Jul 2004 20:56:39 +0400
Received: from sun10.atlantis.ru (sun10.atlantis.ru [212.83.3.65] (may be
	forged))
	by post.atlantis.ru (8.11.6/8.11.6) with SMTP id i69Gudk14519
	for <bug-commoncpp@gnu.org>; Fri, 9 Jul 2004 20:56:39 +0400
Received: from samael.dungeon.gollard.ru (fa77.atlantis.ru [194.85.135.77]
	(may be forged))
	by sun10.atlantis.ru (8.9.2/8.9.2) with SMTP id VAA22684
	for <bug-commoncpp@gnu.org>; Fri, 9 Jul 2004 21:56:45 +0400 (MSD)
Date: Fri, 9 Jul 2004 21:59:32 +0400
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00.6) Business
X-Priority: 3 (Normal)
Message-ID: <148367685484.20040709215932@dezcom.mephi.ru>
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="----------B0FE8B1233A9F1"
Subject: URLStream patch (proxy authentificaion feature)
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Jul 2004 17:59:10 -0000

------------B0FE8B1233A9F1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi All.

Sending path, which mkes available using class ost::URLStream for
fetching content via HTTP-proxy.
Basic proxy authentification scheme supported.

-- 
Best regards,
 Andrey                          mailto:ilfis@dezcom.mephi.ru
------------B0FE8B1233A9F1
Content-Type: application/octet-stream; name="url.h.patch"
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="url.h.patch"

MTMwYTEzMQo+IAljb25zdCBjaGFyICpwcm94eVVzZXIsICpwcm94eVBhc3N3ZDsKMTQwYTE0
Mgo+IAlBdXRoZW50aWNhdGlvbiBwcm94eUF1dGg7CjE0OWExNTIsMTUzCj4gCW9zdDo6U3Ry
aW5nIG1faG9zdCwgbV9hZGRyZXNzOwo+IAoyMDhhMjEzLDIyMgo+IA0KPiAJLyoqDQo+IAkq
IEdldCBVUkwgZGF0YSBmcm9tIGEgbmFtZWQgc3RyZWFtIG9mIGEga25vd24gYnVmZmVyIHNp
emUuDQo+IAkqIFJlcXVlc3RpbmcgVVJMIGRlZmluZWQgaW4gcHJldmlvdXMgY2FsbHMgb2Yg
c2V0QWRkcmVzcygpIGFuZCANCj4gCSogc2V0SG9zdCgpIGZ1bmN0aW9ucy4NCj4gCSoNCj4g
CSogQHJldHVybiB1cmwgZXJyb3IgY29kZS4NCj4gCSogQHBhcmFtIGJ1ZmZlciBzaXplIG9m
IGJ1ZmZlci4NCj4gCSovDQo+IAlFcnJvciBnZXQoaW50IGJ1ZmZlciA9IDUxMik7CQkNCjI1
MWEyNjYsMjgxCj4gCS8qKg0KPiAJKiBTZXQgdGhlIGhvc3QgZm9yIHRoZSB1cmwNCj4gCSoN
Cj4gCSogQHBhcmFtIHN0ciBob3N0IGFkZHJlc3MuDQo+IAkqLw0KPiAJaW5saW5lIHZvaWQg
c2V0SG9zdChjb25zdCBjaGFyICpzdHIpDQo+IAl7bV9ob3N0ID0gc3RyO307DQo+IA0KPiAJ
LyoqDQo+IAkqIFNldCB0aGUgYWRkcmVzcyBmb3IgdGhlIHVybA0KPiAJKg0KPiAJKiBAcGFy
YW0gc3RyIGFkZHJlc3MgaW4gdGhlIFVSTC4NCj4gCSovDQo+IAlpbmxpbmUgdm9pZCBzZXRB
ZGRyZXNzKGNvbnN0IGNoYXIgKnN0cikNCj4gCXttX2FkZHJlc3MgPSBzdHI7fTsNCj4gCjI4
MmEzMTMsMzM2Cj4gCj4gIAkvKioNCj4gIAkqIFNldCBwcm94eSB1c2VyIGlkIGZvciB0aGUg
dXJsLg0KPiAgCSoNCj4gIAkqIEBwYXJhbSBzdHIgdXNlciBpZC4NCj4gIAkqLw0KPiAgCWlu
bGluZSB2b2lkIHNldFByb3h5VXNlcihjb25zdCBjaGFyICpzdHIpDQo+ICAJe3Byb3h5VXNl
ciA9IHN0cjt9Ow0KPiAgDQo+ICAJLyoqDQo+ICAJKiBTZXQgcHJveHkgcGFzc3dvcmQgZm9y
IHRoZSB1cmwuDQo+ICAJKg0KPiAgCSogQHBhcmFtIHN0ciBwYXNzd29yZC4NCj4gIAkqLw0K
PiAgCWlubGluZSB2b2lkIHNldFByb3h5UGFzc3dvcmQoY29uc3QgY2hhciAqc3RyKQ0KPiAg
CXtwcm94eVBhc3N3ZCA9IHN0cjt9Ow0KPiAgDQo+ICAJLyoqDQo+ICAJKiBTZXQgcHJveHkg
YXV0aGVudGljYXRpb24gdHlwZSBmb3IgdGhlIHVybC4NCj4gIAkqDQo+ICAJKiBAcGFyYW0g
YSBhdXRoZW50aWNhdGlvbi4NCj4gIAkqIEBwYXJhbSBzdHIgc3RyaW5nLg0KPiAgCSovDQo+
ICAJdm9pZCBzZXRQcm94eUF1dGhlbnRpY2F0aW9uKEF1dGhlbnRpY2F0aW9uIGEsIGNvbnN0
IGNoYXIgKnN0ciA9IE5VTEwpOw0K

------------B0FE8B1233A9F1
Content-Type: application/octet-stream; name="url.cpp.patch"
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="url.cpp.patch"

OTZhOTcKPiAJcHJveHlBdXRoID0gYXV0aEFub255bW91czsKOTdhOTkKPiAgCXByb3h5VXNl
ciA9IHByb3h5UGFzc3dkID0gTlVMTDsNCjI5NGEyOTcsMzA4Cj4gVVJMU3RyZWFtOjpFcnJv
ciBVUkxTdHJlYW06OmdldChpbnQgYnVmZmVyKQ0KPiB7DQo+IAlTdHJpbmcgcGF0aCA9IFN0
cmluZygiaHR0cDovLyIpICsgbV9ob3N0Ow0KPiANCj4gCWlmICggbV9hZGRyZXNzLm9wZXJh
dG9yW10oMCkgIT0gJy8nICkNCj4gCQlwYXRoICs9ICIvIjsNCj4gDQo+IAlwYXRoICs9IG1f
YWRkcmVzczsNCj4gDQo+IAlyZXR1cm4gZ2V0KHBhdGguY19zdHIoKSwgYnVmZmVyKTsNCj4g
fQo+IAo1MjFhNTM2LDUzOAo+IA0KPiAJaWYgKCBtX2hvc3QuZW1wdHkoKSApDQo+IAkJbV9o
b3N0ID0gaHA7CjU0NWE1NjMsNTc0Cj4gDQo+IAlzd2l0Y2gocHJveHlBdXRoKQ0KPiAgCXsN
Cj4gCWNhc2UgYXV0aEJhc2ljOg0KPiAgCQlzdHIgPDwgIlByb3h5LUF1dGhvcml6YXRpb246
IEJhc2ljICI7DQo+ICAJCXNucHJpbnRmKHJlbG9jLCA2NCwgIiVzOiVzIiwgcHJveHlVc2Vy
LCBwcm94eVBhc3N3ZCk7DQo+ICAJCWI2NEVuY29kZShyZWxvYywgcmVsb2MgKyA2NCwgMTI4
KTsNCj4gIAkJc3RyIDw8IHJlbG9jICsgNjQgPDwgIlxyXG4iOw0KPiAgCQlzdHIgPDwgIlBy
b3h5LUNvbm5lY3Rpb246IGNsb3NlIiA8PCAiXHJcbiI7DQo+ICAJY2FzZSBhdXRoQW5vbnlt
b3VzOg0KPiAgCQlicmVhazsNCj4gIAl9DQo1NDdjNTc2CjwgICAgICAgICBzdHIgPDwgIkNv
bm5lY3Rpb246IGNsb3NlXHJcbiI7Ci0tLQo+ICAgICBzdHIgPDwgIkNvbm5lY3Rpb246IGNs
b3NlXHJcbiI7Cjc3NGE4MDQsODE1Cj4gCX0KPiB9Cj4gCj4gdm9pZCBVUkxTdHJlYW06OnNl
dFByb3h5QXV0aGVudGljYXRpb24oQXV0aGVudGljYXRpb24gYSwgY29uc3QgY2hhciAqdmFs
dWUpDQo+IHsNCj4gCXByb3h5QXV0aCA9IGE7DQo+IAlpZiAocHJveHlBdXRoICE9IGF1dGhB
bm9ueW1vdXMpDQo+ICAJew0KPiAgCQlpZighcHJveHlVc2VyKQ0KPiAgCQkJcHJveHlVc2Vy
ID0gImFub255bW91cyI7DQo+ICAJCWlmKCFwcm94eVBhc3N3ZCkNCj4gIAkJCXByb3h5UGFz
c3dkID0gIiI7DQo=

------------B0FE8B1233A9F1--




From MAILER-DAEMON Fri Jul 09 14:07:01 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1Bizm1-0000bz-MS
	for mharc-bug-commoncpp@gnu.org; Fri, 09 Jul 2004 14:07:01 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Bizm0-0000bu-LJ
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 14:07:00 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Bizlz-0000bi-4v
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 14:07:00 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Bizlz-0000bf-3b
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 14:06:59 -0400
Received: from [212.83.3.66] (helo=post.atlantis.ru)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bizje-0001v8-BP
	for bug-commoncpp@gnu.org; Fri, 09 Jul 2004 14:04:34 -0400
Received: (from root@localhost)
	by post.atlantis.ru (8.11.6/8.11.6) id i69H4Q814567;
	Fri, 9 Jul 2004 21:04:26 +0400
Received: from sun10.atlantis.ru (sun10.atlantis.ru [212.83.3.65] (may be
	forged))
	by post.atlantis.ru (8.11.6/8.11.6) with SMTP id i69H4Qk14564
	for <bug-commoncpp@gnu.org>; Fri, 9 Jul 2004 21:04:26 +0400
Received: from samael.dungeon.gollard.ru (fa77.atlantis.ru [194.85.135.77]
	(may be forged))
	by sun10.atlantis.ru (8.9.2/8.9.2) with SMTP id WAA22743
	for <bug-commoncpp@gnu.org>; Fri, 9 Jul 2004 22:04:32 +0400 (MSD)
Date: Fri, 9 Jul 2004 22:07:20 +0400
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00.6) Business
X-Priority: 3 (Normal)
Message-ID: <36368152828.20040709220720@dezcom.mephi.ru>
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: ost::String operator[] overloads
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Jul 2004 18:07:00 -0000

Hello ,

I have found that ost::String operator[] can't be correctly used by
VS2003.

Code example:

        ost::String s("aaa");
        if(s[0] != '\0');

Produsing compile error:
 error C2666: 'ost::String::operator`[]'' : 2 overloads have similar conversions
        \include\cc++\string.h(674): could be 'const char ost::String::operator [](unsigned int) const'
        or       'built-in C++ operator[(char *, int)'  

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




From MAILER-DAEMON Mon Jul 12 03:43:47 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BjvTX-0001S6-H6
	for mharc-bug-commoncpp@gnu.org; Mon, 12 Jul 2004 03:43:47 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BjvTU-0001R5-CE
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 03:43:44 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BjvTS-0001Ql-4H
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 03:43:42 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BjvTR-0001Qb-SG
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 03:43:42 -0400
Received: from [129.101.155.251] (helo=mailB.its.uidaho.edu)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BjvR1-0001O9-6Q
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 03:41:11 -0400
Received: from falcon (falcon.advancement.uidaho.edu [129.101.69.98])
	by mailB.its.uidaho.edu (Go Vandals!)
	with SMTP id <0I0Q00MYDAOMMW@mailB.its.uidaho.edu> for
	bug-commoncpp@gnu.org; Mon, 12 Jul 2004 00:41:10 -0700 (PDT)
Date: Mon, 12 Jul 2004 00:41:10 -0700
From: Chad Yates <cyates@uidaho.edu>
To: bug-commoncpp <bug-commoncpp@gnu.org>
Message-id: <NBBBJJODBJBNJFNIDDCNIEGNFEAA.cyates@uidaho.edu>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Subject: Persistence Engine flush issue and fixes for cppunit tests.
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jul 2004 07:43:44 -0000

I have finally gotten a chance to look at some projects that use commoncpp2,
and in doing so I have figured out a few problems with the persistence
engine, and got the cppunit test suite working on Linux (I originally was
developing only on Win32 when I wrote it).

The problem with the persistent engine creating 0 byte files in the  tests
is do to the fact that when zlib is compiled into the persistence code, the
internal zlib buffer is not flushed completely until the Engine is
destructed.  this poses a problem for the test suite because I close the
archive stream before reading back the data.  since this is done in the same
scope the Engine does not fall out of scope before the archive closes.  The
buffers never get written to disk.  with zlib disabled this problem is not
evident as the data goes straight to the file.  I have introduced a
Engine::flush() method to expose this, but perhaps there is a better way?

Below is a synopsis of what I have changed to bring things back in line.
After some discussion, specifically about flush(), I can provide patches to
1.2.3 or can attempt to apply them to the most current cvs code.

persist.h/engine.cpp:
- Added support for serializing std:strings back in.  was removed when the
  switch to support ost::String was made.  was this Inadvertent?
- Added flush method that flushes the zlib buffers.  This allows you to
explicitly
  flush things before closing the output stream.  This was being handled by
the
  Engine destructor before, now the Destructor calls flush(), but only if
the
  underlying stream is still good().
- Added header dependencies of exception.h and config.h in so that persist.h
  could be used included standalone.
- static_cast necessary to resolve ambiguity in use of std::string vs.
ost::string
  for writing out persistence Id's

Test_Engine.cpp:
  - Commented out int64/uint64 primitive tests in the Persistence tests as
they
    were giving errors, need to investigate further
  - Added explicit calls to new Engine::flush() function before closing down
the
    output archive stream(s).

Test_Date.h:
  - changed expected values to match new style for string 'YYYY-MM-DD' vs.
value
    'YYYYMMDD'.
  - removed using namespace ost statement

Test_TCPStream:
  - commented out isPending test as it is hanging the test suite. looks like
    something changed recently to cause it as my 1.2.0rc1 version doesn't.
What is
    the timeout measured in for the TCPStream constructor and the isPending
    function supposed to be anyway? the doxygen docs don't seem to say.

Test_UrlString.h:
  - Now includes url.h instead of urlstring.h  (Must have been combined at
some point).
  - adjusted for changes to ost::String usage

Thanks,

Chad




From MAILER-DAEMON Thu Jul 15 16:24:05 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlClx-0006ZH-CB
	for mharc-bug-commoncpp@gnu.org; Thu, 15 Jul 2004 16:24:05 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlClv-0006Z6-5l
	for bug-commoncpp@gnu.org; Thu, 15 Jul 2004 16:24:03 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlClt-0006Yu-3Z
	for bug-commoncpp@gnu.org; Thu, 15 Jul 2004 16:24:02 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlCls-0006Yr-Tq
	for bug-commoncpp@gnu.org; Thu, 15 Jul 2004 16:24:01 -0400
Received: from [66.235.192.199] (helo=host134.ipowerweb.com)
	by monty-python.gnu.org with smtp (Exim 4.34) id 1BlCjF-0004Tu-V3
	for bug-commoncpp@gnu.org; Thu, 15 Jul 2004 16:21:18 -0400
Received: (qmail 26669 invoked from network); 15 Jul 2004 20:21:15 -0000
Received: from unknown (HELO ralphlaptop.ralphdellamorte.com) (64.74.50.140)
	by host134.ipowerweb.com with SMTP; 15 Jul 2004 20:21:15 -0000
Message-Id: <5.1.0.14.0.20040715162018.00bcfd28@mail.ralphdellamorte.com>
X-Sender: ralph@ralphdellamorte.com@mail.ralphdellamorte.com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 15 Jul 2004 16:21:17 -0400
To: bug-commoncpp@gnu.org
From: Ralph Dellamorte <ralph@ralphdellamorte.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: please help
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Jul 2004 20:24:03 -0000

I need a simple client app using the commoncpp libs on unix. Any help would 
be much appreciated. I just need to connect to an ip/port and read data 
from that. Thanks all :)





From MAILER-DAEMON Fri Jul 16 01:47:05 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlLYn-0004wg-Og
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 01:47:05 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlLYn-0004wb-2J
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 01:47:05 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlLYm-0004wP-8u
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 01:47:04 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlLYm-0004wM-6y
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 01:47:04 -0400
Received: from [129.101.155.251] (helo=mailB.its.uidaho.edu)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlLVn-0000DC-Og
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 01:44:00 -0400
Received: from [192.168.0.100] (w160200.wireless.fsr.net [64.126.160.200])
	by mailB.its.uidaho.edu (Go Vandals!)
	with ESMTPA id <0I0X001VVJX4DK@mailB.its.uidaho.edu> for
	bug-commoncpp@gnu.org; Thu, 15 Jul 2004 22:43:58 -0700 (PDT)
Date: Thu, 15 Jul 2004 22:42:03 -0700
From: Chad Yates <cyates@uidaho.edu>
To: bug-commoncpp@gnu.org
Message-id: <40F76AAB.7050404@uidaho.edu>
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_Wt2aA0b60/EP3m3x+artmQ)"
X-Accept-Language: en-us, en
User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040708)
Subject: Patch to add std::string support back into the Persistence Engine
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2004 05:47:05 -0000

This is a multi-part message in MIME format.

--Boundary_(ID_Wt2aA0b60/EP3m3x+artmQ)
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT

Attached is a patch to persist.h and engine.cpp to be applied directly 
to the CVS version.  It adds back support for std::string to the 
Persistence Engine.  This support was removed (I believe on accident) 
when a library wide change was made to ost::String.

I will be submitting a series of patches to things mentioned in my 
previous post in order to provide my changes  piecemeal for your 
consideration.

,Chad

--Boundary_(ID_Wt2aA0b60/EP3m3x+artmQ)
Content-type: text/x-patch; name=engine.cpp.patch
Content-transfer-encoding: 7BIT
Content-disposition: inline; filename=engine.cpp.patch

Index: src/engine.cpp
===================================================================
RCS file: /cvsroot/cplusplus/commoncpp2/src/engine.cpp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 engine.cpp
--- src/engine.cpp	15 Dec 2003 19:26:49 -0000	1.1.1.1
+++ src/engine.cpp	16 Jul 2004 05:37:45 -0000
@@ -265,7 +265,7 @@
 		  uint32 classId = myClassMap.size();
 		  myClassMap[object->getPersistenceID()] = classId;
 		  write(classId);
-		  write(object->getPersistenceID());
+		  write(static_cast<String>(object->getPersistenceID()));
 		}
 	  else
 		{
@@ -416,6 +416,32 @@
   delete[] buffer;
 }
 
+
+/*
+ * note, does not (yet?) throw an exception, but interface
+ * prepared ..
+ */
+void Engine::write(const std::string& str) THROWS (Engine::Exception)
+{
+  assert(myOperationalMode == modeWrite);
+  uint32 len = (uint32)str.length();
+  write(len);
+  writeBinary((uint8*)str.c_str(),len);
+}
+
+void Engine::read(std::string& str) THROWS (Engine::Exception)
+{
+  assert(myOperationalMode == modeRead);
+  uint32 len = 0;
+  read(len);
+  uint8 *buffer = new uint8[len+1];
+  readBinary(buffer,len);
+  buffer[len] = 0;
+  str = (char*)buffer;
+  delete[] buffer;
+}
+
+
 #define CCXX_RE(ar,ob)   ar.read(ob); return ar
 #define CCXX_WE(ar,ob)   ar.write(ob); return ar
 
@@ -459,6 +485,9 @@
 CCXX_EXPORT(Engine&) operator >>( Engine& ar, String& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
 CCXX_EXPORT(Engine&) operator <<( Engine& ar, String ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
 
+CCXX_EXPORT(Engine&) operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
+CCXX_EXPORT(Engine&) operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
+
 CCXX_EXPORT(Engine&) operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception) {
 	uint32 a; ar.read(a); ob=a==1;return ar;
 }

--Boundary_(ID_Wt2aA0b60/EP3m3x+artmQ)
Content-type: text/x-patch; name=persist.h.patch
Content-transfer-encoding: 7BIT
Content-disposition: inline; filename=persist.h.patch

Index: include/cc++/persist.h
===================================================================
RCS file: /cvsroot/cplusplus/commoncpp2/include/cc++/persist.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 persist.h
--- include/cc++/persist.h	15 Dec 2003 19:27:12 -0000	1.1.1.1
+++ include/cc++/persist.h	16 Jul 2004 05:38:17 -0000
@@ -306,7 +306,9 @@
 	void write(float i)  THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
 	void write(double i) THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
 #undef CCXX_ENGINEWRITE_REF
+
 	CCXX_MEMBER_EXPORT(void) write(const String& str) THROWS (Exception);
+	CCXX_MEMBER_EXPORT(void) write(const std::string& str) THROWS (Exception);
 
 	// Every write operation boils down to one or more of these
 	CCXX_MEMBER_EXPORT(void) writeBinary(const uint8* data, const uint32 size) THROWS (Exception);
@@ -342,6 +344,7 @@
 #undef CCXX_ENGINEREAD_REF
 
 	CCXX_MEMBER_EXPORT(void) read(String& str) THROWS (Exception);
+	CCXX_MEMBER_EXPORT(void) read(std::string& str) THROWS (Exception);
 
 	// Every read operation boild down to one or more of these
 	CCXX_MEMBER_EXPORT(void) readBinary(uint8* data, uint32 size) THROWS (Exception);
@@ -459,6 +462,11 @@
 CCXX_EXPORT(Engine&) operator <<( Engine& ar, String ob)  THROWS (Engine::Exception);
 
 /** @relates Engine */
+CCXX_EXPORT(Engine&) operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception);
+/** @relates Engine */
+CCXX_EXPORT(Engine&) operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception);
+
+/** @relates Engine */
 CCXX_EXPORT(Engine&) operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception);
 /** @relates Engine */
 CCXX_EXPORT(Engine&) operator <<( Engine& ar, bool ob)  THROWS (Engine::Exception);
@@ -579,7 +587,3 @@
  * c-basic-offset: 8
  * End:
  */
-
-
-
-

--Boundary_(ID_Wt2aA0b60/EP3m3x+artmQ)--



From MAILER-DAEMON Fri Jul 16 07:11:35 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlQco-0004RT-UR
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 07:11:35 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlQcn-0004RO-BQ
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 07:11:33 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlQcl-0004RB-Ts
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 07:11:33 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlQcl-0004R8-Ri
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 07:11:31 -0400
Received: from [212.83.3.66] (helo=post.atlantis.ru)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlQa3-0006Pt-VK
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 07:08:47 -0400
Received: (from root@localhost)
	by post.atlantis.ru (8.11.6/8.11.6) id i6GA9fG26100;
	Fri, 16 Jul 2004 14:09:41 +0400
Received: from sun10.atlantis.ru (sun10.atlantis.ru [212.83.3.65] (may be
	forged))
	by post.atlantis.ru (8.11.6/8.11.6) with SMTP id i6GA9e626097;
	Fri, 16 Jul 2004 14:09:40 +0400
Received: from samael.dungeon.gollard.ru (fa77.atlantis.ru [194.85.135.77]
	(may be forged))
	by sun10.atlantis.ru (8.9.2/8.9.2) with SMTP id PAA02913;
	Fri, 16 Jul 2004 15:08:26 +0400 (MSD)
Date: Fri, 16 Jul 2004 15:11:25 +0400
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00.6) Business
X-Priority: 3 (Normal)
Message-ID: <1848068218.20040716151125@dezcom.mephi.ru>
To: bug-commoncpp@gnu.org
In-Reply-To: <40F76AAB.7050404@uidaho.edu>
References: <40F76AAB.7050404@uidaho.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: 
Subject: Re: Patch to add std::string support back into the Persistence
	Engine
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2004 11:11:33 -0000

Hello Chad,

CY> Attached is a patch to persist.h and engine.cpp to be applied directly
CY> to the CVS version.  It adds back support for std::string to the 
CY> Persistence Engine.  This support was removed (I believe on accident)
CY> when a library wide change was made to ost::String.

CY> I will be submitting a series of patches to things mentioned in my
CY> previous post in order to provide my changes  piecemeal for your 
CY> consideration.

Great!
And what about std::wstring?

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




From MAILER-DAEMON Fri Jul 16 11:32:40 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlUhT-0000c2-Os
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 11:32:39 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlUhR-0000bw-J9
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 11:32:37 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlUhQ-0000bk-P0
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 11:32:37 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlUhQ-0000bh-MC
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 11:32:36 -0400
Received: from [212.83.3.66] (helo=post.atlantis.ru)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlUei-0007ph-W4
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 11:29:49 -0400
Received: (from root@localhost)
	by post.atlantis.ru (8.11.6/8.11.6) id i6GEUwU29301;
	Fri, 16 Jul 2004 18:30:58 +0400
Received: from sun10.atlantis.ru (sun10.atlantis.ru [212.83.3.65] (may be
	forged))
	by post.atlantis.ru (8.11.6/8.11.6) with SMTP id i6GEUw629298
	for <bug-commoncpp@gnu.org>; Fri, 16 Jul 2004 18:30:58 +0400
Received: from samael.dungeon.gollard.ru (fa77.atlantis.ru [194.85.135.77]
	(may be forged))
	by sun10.atlantis.ru (8.9.2/8.9.2) with SMTP id TAA09143
	for <bug-commoncpp@gnu.org>; Fri, 16 Jul 2004 19:29:44 +0400 (MSD)
Date: Fri, 16 Jul 2004 19:32:44 +0400
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00.6) Business
X-Priority: 3 (Normal)
Message-ID: <17423747078.20040716193244@dezcom.mephi.ru>
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="----------371E61291568C8AF"
Subject: Serious Bug in TCPStream & solution.
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2004 15:32:37 -0000

------------371E61291568C8AF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi All.

I have found bug in ost::TCPStream. (version 1.2.3, current CVS
version is not available for me).

I'm using TCPStream for geting web-pages from web server.
This bug produce uncompleted page retrieval, or application crash.
The error is in error-handling while end of data detected.

Attached example demonstated this error.
Test 1 showing incomplete text receiving. (ending </html> never
appears)
Test 2 showing application crach due to exception.

========= socket.cpp ==================
L1819        if(rlen < 1)
        {
//              clear(ios::failbit | rdstate());
                if(rlen < 0)
                     error(errNotConnected,"Connection error",socket_errno);
                else
                {
L1826                        error(errInput,"Could not read from socket",socket_errno);
                        clear(ios::failbit | rdstate());
                }
                return EOF;
L1830        }
=======================================

For propely working line 1826 shuld be commented (or removed).
  

-- 
Best regards,
 Andrey                          mailto:ilfis@dezcom.mephi.ru
------------371E61291568C8AF
Content-Type: text/plain; name="TcpStreamBugTest.cpp"
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="TcpStreamBugTest.cpp"

Ly8gVGNwU3RyZWFtQnVnVGVzdC5jcHAgOiBEZWZpbmVzIHRoZSBlbnRyeSBwb2ludCBmb3Ig
dGhlIGNvbnNvbGUgYXBwbGljYXRpb24uDQovLw0KDQojaW5jbHVkZSAic3RkYWZ4LmgiDQoj
aW5jbHVkZSA8aW9zdHJlYW0+DQojaW5jbHVkZSA8aXRlcmF0b3I+DQojaW5jbHVkZSA8Y2Mr
Ky9zb2NrZXQuaD4NCg0KdXNpbmcgbmFtZXNwYWNlIG9zdDsNCnVzaW5nIG5hbWVzcGFjZSBz
dGQ7DQoNCiNkZWZpbmUgTUFYX1JFQURfQlVGIDEwMjQNCg0Kdm9pZCB0ZXN0MSgpew0KCWNo
YXIgYnVmW01BWF9SRUFEX0JVRl07DQoJVENQU3RyZWFtIG1fc3RyKCIxOTQuODcuMC41MCIs
IDgwKTsgLy8gd3d3LnJ1DQoJbV9zdHI8PCJHRVQiPDxlbmRsOw0KDQoJZG8gew0KCQkobV9z
dHIpLnJlYWQoYnVmLE1BWF9SRUFEX0JVRik7DQoJCWludCByZWFkbGVuCT0gKG1fc3RyKS5n
Y291bnQoKTsNCgkJY291dC53cml0ZShidWYscmVhZGxlbik7DQoJfXdoaWxlKChtX3N0ciku
Z29vZCgpKTsNCg0KCWlmKG1fc3RyLmdvb2QoKSkNCgkJY291dCA8PCAiVENQU3RyZWFtIGdv
b2QiIDw8IGVuZGw7DQoJZWxzZQ0KCQljb3V0IDw8ICJUQ1BTdHJlYW0gZmFpbCIgPDwgZW5k
bDsNCn0NCg0Kdm9pZCB0ZXN0Migpew0KCVRDUFN0cmVhbSBtX3N0cigiMTk0Ljg3LjAuNTAi
LCA4MCk7IC8vIHd3dy5ydQ0KCW1fc3RyPDwiR0VUIjw8ZW5kbDsNCg0KCXN0ZDo6Y29weShz
dGQ6OmlzdHJlYW1idWZfaXRlcmF0b3I8Y2hhcj4obV9zdHIpLA0KCQlzdGQ6OmlzdHJlYW1i
dWZfaXRlcmF0b3I8Y2hhcj4oKSwNCgkJc3RkOjpvc3RyZWFtX2l0ZXJhdG9yPGNoYXI+KHN0
ZDo6Y291dCkpOw0KDQoJaWYobV9zdHIuZ29vZCgpKQ0KCQljb3V0IDw8ICJUQ1BTdHJlYW0g
Z29vZCIgPDwgZW5kbDsNCgllbHNlDQoJCWNvdXQgPDwgIlRDUFN0cmVhbSBmYWlsIiA8PCBl
bmRsOw0KDQp9DQoNCmludCBfdG1haW4oaW50IGFyZ2MsIF9UQ0hBUiogYXJndltdKQ0Kew0K
CWNvdXQgPDwgIlRDUFN0cmVhbSBidWcgVGVzdDEuLi4iIDw8IGVuZGw7DQoJdGVzdDEoKTsN
Cg0KCWNvdXQgPDwgZW5kbCA8PCAiVENQU3RyZWFtIGJ1ZyBUZXN0Mi4uLiIgPDwgZW5kbDsN
Cgl0ZXN0MigpOw0KDQoJcmV0dXJuIDA7DQp9DQoNCg==

------------371E61291568C8AF
Content-Type: text/plain; name="stdafx.h"
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="stdafx.h"

Ly8gc3RkYWZ4LmggOiBpbmNsdWRlIGZpbGUgZm9yIHN0YW5kYXJkIHN5c3RlbSBpbmNsdWRl
IGZpbGVzLA0KLy8gb3IgcHJvamVjdCBzcGVjaWZpYyBpbmNsdWRlIGZpbGVzIHRoYXQgYXJl
IHVzZWQgZnJlcXVlbnRseSwgYnV0DQovLyBhcmUgY2hhbmdlZCBpbmZyZXF1ZW50bHkNCi8v
DQoNCiNwcmFnbWEgb25jZQ0KDQoNCiNpbmNsdWRlIDxpb3N0cmVhbT4NCiNpbmNsdWRlIDx0
Y2hhci5oPg0KDQovLyBUT0RPOiByZWZlcmVuY2UgYWRkaXRpb25hbCBoZWFkZXJzIHlvdXIg
cHJvZ3JhbSByZXF1aXJlcyBoZXJlDQo=

------------371E61291568C8AF--




From MAILER-DAEMON Fri Jul 16 15:28:14 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlYNS-0002QL-GX
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 15:28:14 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Bk65P-0002IT-9b
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 15:03:35 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Bk65M-0002HX-Sc
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 15:03:34 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Bk65M-0002Gp-Nj
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 15:03:32 -0400
Received: from [128.119.91.94] (helo=franklin.ecs.umass.edu)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bk62d-00021T-BI
	for bug-commoncpp@gnu.org; Mon, 12 Jul 2004 15:00:43 -0400
Received: from sisko.ecs.umass.edu (sisko.ecs.umass.edu [128.119.91.173])
	by franklin.ecs.umass.edu (8.12.10/8.12.10) with ESMTP id
	i6CJ0ev0015083
	for <bug-commoncpp@gnu.org>; Mon, 12 Jul 2004 15:00:40 -0400
Received: from localhost (abekkerm@localhost)
	by sisko.ecs.umass.edu (8.11.6+Sun/8.9.3) with ESMTP id i6CJ0en20731
	for <bug-commoncpp@gnu.org>; Mon, 12 Jul 2004 15:00:40 -0400 (EDT)
Date: Mon, 12 Jul 2004 15:00:40 -0400 (EDT)
From: Anna  Bekkerman <abekkerm@ecs.umass.edu>
To: bug-commoncpp@gnu.org
Message-ID: <Pine.GSO.4.51.0407121447501.19556@sisko.ecs.umass.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 2.39
X-Mailman-Approved-At: Fri, 16 Jul 2004 15:28:13 -0400
Subject: Error while compiling Threadlock class
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jul 2004 19:03:35 -0000

Hello,

I've downloaded and installed Common C++ 2-1.1.0 . While I'm trying to
compile my application with cc++/socket.h I obtain the following error:

cc++/thread.h:325: syntax error before `;'

As I understand there is some problem with compile time flags. It seems
that the best way to find out which flags I should use is to execute the
"ccgnu2-config" script and add the flags it reports to my makefile.

However, no "ccgnu2-config" script is installed on my machine, so I'm
looking for an alternative way to find out which flags should be used. Can
anybody help me with this issue?

Thank you a lot,
	Anna.





From MAILER-DAEMON Fri Jul 16 15:28:14 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlYNS-0002QQ-LT
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 15:28:14 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Bks6f-0008Hh-A3
	for bug-commoncpp@gnu.org; Wed, 14 Jul 2004 18:20:05 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Bks6c-0008HV-Bf
	for bug-commoncpp@gnu.org; Wed, 14 Jul 2004 18:20:04 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Bks6c-0008HS-6v
	for bug-commoncpp@gnu.org; Wed, 14 Jul 2004 18:20:02 -0400
Received: from [203.51.27.145] (helo=purcell.homeip.net)
	by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.34)
	id 1Bks3d-0003Fz-Cy
	for bug-commoncpp@gnu.org; Wed, 14 Jul 2004 18:17:04 -0400
Received: from [192.168.1.142] (helo=debian ident=mail)
	by purcell.homeip.net with esmtp (Exim 4.34)
	id 1Bks39-0005Mu-Js; Thu, 15 Jul 2004 08:16:44 +1000
Received: from msp by debian with local (Exim 3.36 #1 (Debian))
	id 1Bks3G-0002f8-00; Thu, 15 Jul 2004 08:16:34 +1000
Date: Thu, 15 Jul 2004 08:16:33 +1000
From: Mark Purcell <msp@debian.org>
To: bug-commoncpp@gnu.org
Message-ID: <20040714221633.GA9659@dvd.purcell.id.au>
Mime-Version: 1.0
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040523i
Sender: Mark Purcell <mark@purcell.id.au>
X-SA-Exim-Connect-IP: 192.168.1.142
X-SA-Exim-Mail-From: mark@purcell.id.au
Content-Type: text/plain; charset=us-ascii
X-SA-Exim-Version: 4.0 (built Sat, 24 Apr 2004 12:31:30 +0200)
X-SA-Exim-Scanned: Yes (on purcell.homeip.net)
X-Mailman-Approved-At: Fri, 16 Jul 2004 15:28:13 -0400
Cc: Andreas Jochens <aj@andaco.de>, 259384-forwarded@bugs.debian.org
Subject: [aj@andaco.de: Bug#259384: libcommoncpp2: FTBFS with gcc-3.4: New
	patch]
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Jul 2004 22:20:05 -0000

David (and others),

Find enclosed a patch to build libcommoncpp2 against gcc-3.4.

Mark
http://packages.debian.org/libcommoncpp2

----- Forwarded message from Andreas Jochens <aj@andaco.de> -----

Envelope-to: debian@purcell.id.au
Delivery-date: Wed, 14 Jul 2004 22:11:11 +1000
Reply-To: Andreas Jochens <aj@andaco.de>, 259384@bugs.debian.org
Resent-From: Andreas Jochens <aj@andaco.de>
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Mark Purcell <msp@debian.org>
Resent-Date: Wed, 14 Jul 2004 12:03:07 UTC
Resent-Message-ID: <handler.259384.B259384.108980553132127@bugs.debian.org>
X-Debian-PR-Message: report 259384
X-Debian-PR-Package: libcommoncpp2
X-Debian-PR-Keywords: patch
To: 259384@bugs.debian.org
From: Andreas Jochens <aj@andaco.de>
Resent-Sender: Debian BTS <debbugs@bugs.debian.org>
X-SA-Exim-Connect-IP: 128.193.0.4
X-SA-Exim-Mail-From: debbugs@bugs.debian.org
Subject: Bug#259384: libcommoncpp2: FTBFS with gcc-3.4: New patch
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on purcell.homeip.net
X-Spam-Status: No, hits=0.0 required=4.0 tests=none autolearn=no version=2.63
X-Spam-Level: 
X-SA-Exim-Version: 4.0 (built Sat, 24 Apr 2004 12:31:30 +0200)
X-SA-Exim-Scanned: Yes (on purcell.homeip.net)

Oops. My last patch was incomplete.
I forgot to remove the extra ';' characters in the template/*.h 
header files. The attached patch also removes those.

Regards
Andreas Jochens

diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/cmdoptns.h ./include/cc++/cmdoptns.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/cmdoptns.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/cmdoptns.h	2004-07-14 12:24:56.547689472 +0200
@@ -444,7 +444,7 @@
 );
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/digest.h ./include/cc++/digest.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/digest.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/digest.h	2004-07-14 12:29:09.842755965 +0200
@@ -441,7 +441,7 @@
 };
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/exception.h ./include/cc++/exception.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/exception.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/exception.h	2004-07-14 11:55:13.601985494 +0200
@@ -101,7 +101,7 @@
 
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/file.h ./include/cc++/file.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/file.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/file.h	2004-07-14 11:55:36.524560422 +0200
@@ -1084,7 +1084,7 @@
 #endif
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/groups.h ./include/cc++/groups.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/groups.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/groups.h	2004-07-14 12:30:13.611424094 +0200
@@ -156,7 +156,7 @@
 };
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/misc.h ./include/cc++/misc.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/misc.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/misc.h	2004-07-14 12:03:52.943719743 +0200
@@ -744,7 +744,7 @@
 };
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/numbers.h ./include/cc++/numbers.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/numbers.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/numbers.h	2004-07-14 12:24:06.273400322 +0200
@@ -313,7 +313,7 @@
 };
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/persist.h ./include/cc++/persist.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/persist.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/persist.h	2004-07-14 12:27:53.731464098 +0200
@@ -561,7 +561,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/process.h ./include/cc++/process.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/process.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/process.h	2004-07-14 12:05:21.614598701 +0200
@@ -135,7 +135,7 @@
 };
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/serial.h ./include/cc++/serial.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/serial.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/serial.h	2004-07-14 12:02:57.829361239 +0200
@@ -890,7 +890,7 @@
 #endif
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/slog.h ./include/cc++/slog.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/slog.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/slog.h	2004-07-14 11:59:07.233882291 +0200
@@ -246,7 +246,7 @@
 #endif
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/socket.h ./include/cc++/socket.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/socket.h	2003-07-19 19:15:33.000000000 +0200
+++ ./include/cc++/socket.h	2004-07-14 12:00:00.597579719 +0200
@@ -2173,7 +2173,7 @@
 #endif
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/strchar.h ./include/cc++/strchar.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/strchar.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/strchar.h	2004-07-14 11:54:49.241688065 +0200
@@ -52,7 +52,7 @@
 #ifdef	HAVE_STRINGS_H
 extern "C" {
 #include <strings.h>
-};
+}
 #endif
 
 #ifdef	HAVE_STRCASECMP
@@ -133,7 +133,7 @@
 };
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/thread.h ./include/cc++/thread.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/thread.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/thread.h	2004-07-14 11:52:18.689764763 +0200
@@ -1080,7 +1080,7 @@
 	static Thread* _main;
 
 	Thread *_parent;
-	enum Cancel _cancel;
+	Cancel _cancel;
 	Semaphore *_start;
 
 	// private data
@@ -1694,15 +1694,15 @@
 
 /** @relates Buffer */
 inline int get(Buffer &b, void *o)
-	{return b.wait(o);};
+	{return b.wait(o);}
 
 /** @relates Buffer */
 inline int put(Buffer &b, void *o)
-	{return b.post(o);};
+	{return b.post(o);}
 
 /** @relates Buffer */
 inline int peek(Buffer &b, void *o)
-	{return b.peek(o);};
+	{return b.peek(o);}
 
 
 // FIXME: not in win32 implementation
@@ -1809,7 +1809,7 @@
 // macosx dynamic loader...
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/unix.h ./include/cc++/unix.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/unix.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/unix.h	2004-07-14 12:31:10.793366004 +0200
@@ -397,7 +397,7 @@
 #endif // ndef WIN32
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/url.h ./include/cc++/url.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/url.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/url.h	2004-07-14 12:25:34.879285356 +0200
@@ -350,7 +350,7 @@
 };
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/urlstring.h ./include/cc++/urlstring.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/urlstring.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/urlstring.h	2004-07-14 12:09:10.104478208 +0200
@@ -159,7 +159,7 @@
 		unsigned char *dst, size_t dstsize);
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/xml.h ./include/cc++/xml.h
--- ../tmp-orig/libcommoncpp2-1.0.13/include/cc++/xml.h	2003-06-07 01:16:45.000000000 +0200
+++ ./include/cc++/xml.h	2004-07-14 12:26:50.037767560 +0200
@@ -324,7 +324,7 @@
 #endif // ifdef COMMON_XML_PARSING
 	
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/buffer.cpp ./src/buffer.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/buffer.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/buffer.cpp	2004-07-14 12:22:55.460078218 +0200
@@ -146,7 +146,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/cmdoptns.cpp ./src/cmdoptns.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/cmdoptns.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/cmdoptns.cpp	2004-07-14 12:25:16.569822014 +0200
@@ -663,7 +663,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/date.cpp ./src/date.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/date.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/date.cpp	2004-07-14 12:29:36.506599590 +0200
@@ -194,7 +194,7 @@
 Date::Date(int year, unsigned month, unsigned day)
 {
 	toJulian(year, month, day);
-};
+}
 
 bool Date::isValid(void) const
 {
@@ -916,8 +916,8 @@
 
 DateNumber::DateNumber(char *str) :
 Number(str, 10), Date(str, 10)
-{};
+{}
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/digest.cpp ./src/digest.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/digest.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/digest.cpp	2004-07-14 12:28:52.471115372 +0200
@@ -203,6 +203,6 @@
 
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif	
 	
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/dir.cpp ./src/dir.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/dir.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/dir.cpp	2004-07-14 11:59:22.324968777 +0200
@@ -145,7 +145,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/dso.cpp ./src/dso.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/dso.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/dso.cpp	2004-07-14 12:04:48.462999854 +0200
@@ -275,7 +275,7 @@
 #endif
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/engine.cpp ./src/engine.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/engine.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/engine.cpp	2004-07-14 12:28:28.768696000 +0200
@@ -463,7 +463,7 @@
 #undef CCXX_WE
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/event.cpp ./src/event.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/event.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/event.cpp	2004-07-14 11:58:37.190682439 +0200
@@ -130,7 +130,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 	
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/exception.cpp ./src/exception.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/exception.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/exception.cpp	2004-07-14 12:05:01.222536159 +0200
@@ -70,7 +70,7 @@
 { }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif //HAVE_EXCEPTION
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/fifo.cpp ./src/fifo.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/fifo.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/fifo.cpp	2004-07-14 12:23:27.558878230 +0200
@@ -152,7 +152,7 @@
 #endif // ndef WIN32
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/file.cpp ./src/file.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/file.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/file.cpp	2004-07-14 11:59:46.893225547 +0200
@@ -1237,7 +1237,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/friends.cpp ./src/friends.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/friends.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/friends.cpp	2004-07-14 11:58:19.646069574 +0200
@@ -146,7 +146,7 @@
 #endif // !WIN32
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/groups.cpp ./src/groups.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/groups.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/groups.cpp	2004-07-14 12:29:50.211949187 +0200
@@ -222,7 +222,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/inaddr.cpp ./src/inaddr.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/inaddr.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/inaddr.cpp	2004-07-14 12:00:57.499593800 +0200
@@ -430,7 +430,7 @@
 { }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/keydata.cpp ./src/keydata.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/keydata.cpp	2003-07-02 23:21:19.000000000 +0200
+++ ./src/keydata.cpp	2004-07-14 12:04:30.117542093 +0200
@@ -559,7 +559,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/md5.cpp ./src/md5.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/md5.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/md5.cpp	2004-07-14 12:30:34.781330166 +0200
@@ -336,6 +336,6 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif	
 	
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/mempager.cpp ./src/mempager.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/mempager.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/mempager.cpp	2004-07-14 12:03:40.279165038 +0200
@@ -160,7 +160,7 @@
 
 SharedMemPager::SharedMemPager(int pg) :
 MemPager(pg), Mutex()
-{};
+{}
 
 void SharedMemPager::purge(void)
 {
@@ -190,7 +190,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};	
+}	
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/mutex.cpp ./src/mutex.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/mutex.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/mutex.cpp	2004-07-14 11:57:11.029316393 +0200
@@ -286,13 +286,13 @@
 MutexCounter::MutexCounter() : Mutex()
 {
 	counter = 0;
-};
+}
 #endif
 
 MutexCounter::MutexCounter(int initial) : Mutex()
 {
 	counter = initial;
-};
+}
 
 int operator++(MutexCounter &mc)
 {
@@ -513,7 +513,7 @@
 #endif // !WIN32
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/numbers.cpp ./src/numbers.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/numbers.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/numbers.cpp	2004-07-14 12:24:27.799242463 +0200
@@ -247,5 +247,5 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/peer.cpp ./src/peer.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/peer.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/peer.cpp	2004-07-14 12:01:19.066429883 +0200
@@ -171,7 +171,7 @@
 
 UDPDuplex::UDPDuplex(const InetAddress &bind, tpport_t port) :
 UDPTransmit(bind, port + 1), UDPReceive(bind, port)
-{};
+{}
 
 Socket::Error UDPDuplex::connect(const InetHostAddress &host, tpport_t port)
 {
@@ -194,5 +194,5 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/persist.cpp ./src/persist.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/persist.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/persist.cpp	2004-07-14 12:27:37.391620424 +0200
@@ -137,7 +137,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/pipe.cpp ./src/pipe.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/pipe.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/pipe.cpp	2004-07-14 12:23:46.684184089 +0200
@@ -186,7 +186,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/port.cpp ./src/port.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/port.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/port.cpp	2004-07-14 12:02:06.738225741 +0200
@@ -870,7 +870,7 @@
 }						
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif		
 	
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/process.cpp ./src/process.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/process.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/process.cpp	2004-07-14 12:05:39.974053691 +0200
@@ -217,7 +217,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/semaphore.cpp ./src/semaphore.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/semaphore.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/semaphore.cpp	2004-07-14 11:57:41.523429394 +0200
@@ -233,7 +233,7 @@
 #endif //WIN32
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/serial.cpp ./src/serial.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/serial.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/serial.cpp	2004-07-14 12:03:18.179432066 +0200
@@ -1735,7 +1735,7 @@
 #endif
 		
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/sha.cpp ./src/sha.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/sha.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/sha.cpp	2004-07-14 12:30:50.691253437 +0200
@@ -693,7 +693,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif	
 /** EMACS **
  * Local variables:
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/slog.cpp ./src/slog.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/slog.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/slog.cpp	2004-07-14 11:58:49.133376787 +0200
@@ -333,7 +333,7 @@
 }	
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/socket.cpp ./src/socket.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/socket.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/socket.cpp	2004-07-14 12:02:31.932361367 +0200
@@ -1604,7 +1604,7 @@
 #endif
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/thread.cpp ./src/thread.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/thread.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/thread.cpp	2004-07-14 11:56:37.349818258 +0200
@@ -583,7 +583,7 @@
 	_cancel = cancelInitial;
 
 #endif // WIN32
-};
+}
 
 #ifndef WIN32
 Thread::Thread(const Thread &th)
@@ -1410,7 +1410,7 @@
 {
 	nufds = 0;
 	ufds = NULL;
-};
+}
 
 Poller::~Poller()
 {
@@ -1436,7 +1436,7 @@
 // this function must declared as extern "C" for some compiler
 
 #ifdef CCXX_NAMESPACES
-};
+}
 #endif
  
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/threadkey.cpp ./src/threadkey.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/threadkey.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/threadkey.cpp	2004-07-14 11:58:08.000317873 +0200
@@ -97,7 +97,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/unix.cpp ./src/unix.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/unix.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/unix.cpp	2004-07-14 12:06:13.127652036 +0200
@@ -532,5 +532,5 @@
 
 #endif // ndef WIN32 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/url.cpp ./src/url.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/url.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/url.cpp	2004-07-14 12:25:53.145756985 +0200
@@ -723,10 +723,10 @@
 	if(!str)
 		return;
 	referer = str;
-};
+}
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 /** EMACS **
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/urlstring.cpp ./src/urlstring.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/urlstring.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/urlstring.cpp	2004-07-14 12:22:29.749044350 +0200
@@ -323,5 +323,5 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/src/xml.cpp ./src/xml.cpp
--- ../tmp-orig/libcommoncpp2-1.0.13/src/xml.cpp	2003-06-07 01:16:46.000000000 +0200
+++ ./src/xml.cpp	2004-07-14 12:26:19.221720096 +0200
@@ -132,7 +132,7 @@
 	xml->endElement(name);
 }
 
-};
+}
 
 bool XMLStream::parse(const char *resource)
 {
@@ -462,7 +462,7 @@
 }
 
 #ifdef	CCXX_NAMESPACES
-};
+}
 #endif
 
 #endif // ifdef HAVE_LIBXML
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/counter.h ./template/counter.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/counter.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/counter.h	2004-07-14 13:18:33.181340871 +0200
@@ -63,4 +63,4 @@
 		{return count++;}
 };
 
-};
+}
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/functions.h ./template/functions.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/functions.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/functions.h	2004-07-14 13:18:43.352370535 +0200
@@ -51,6 +51,6 @@
 	return v;
 }	
 
-};
+}
 
 #endif
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/objcount.h ./template/objcount.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/objcount.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/objcount.h	2004-07-14 13:18:54.553200715 +0200
@@ -53,4 +53,4 @@
 template <class T>
 unsigned objCounter<T>::objCount = 0;
 
-};
+}
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/objlink.h ./template/objlink.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/objlink.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/objlink.h	2004-07-14 13:19:00.553038434 +0200
@@ -75,4 +75,4 @@
 	return obj;
 }	 
 
-};
+}
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/objmap.h ./template/objmap.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/objmap.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/objmap.h	2004-07-14 13:19:09.802246694 +0200
@@ -112,4 +112,4 @@
 	return obj;
 }	 
 
-};
+}
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/objsync.h ./template/objsync.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/objsync.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/objsync.h	2004-07-14 13:19:18.559550251 +0200
@@ -59,4 +59,4 @@
 template <class T>
 ost::Mutex objSync<T>::objMutex;
 
-};
+}
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/oststring.h ./template/oststring.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/oststring.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/oststring.h	2004-07-14 13:19:39.827430319 +0200
@@ -62,5 +62,5 @@
 typedef	std::basic_string<char> cstring;
 typedef std::basic_string<char, cistring_char_traits<char> > cistring;
 
-};
+}
 
diff -urN ../tmp-orig/libcommoncpp2-1.0.13/template/pointer.h ./template/pointer.h
--- ../tmp-orig/libcommoncpp2-1.0.13/template/pointer.h	2003-06-07 01:16:51.000000000 +0200
+++ ./template/pointer.h	2004-07-14 13:13:02.172469008 +0200
@@ -116,4 +116,4 @@
 	}
 };	
 
-};
+}


----- End forwarded message -----



From MAILER-DAEMON Fri Jul 16 16:55:13 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlZjd-000699-0b
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 16:55:13 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlZjb-000690-8f
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 16:55:11 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlZjZ-00068R-F2
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 16:55:10 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlZjZ-00068H-CL
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 16:55:09 -0400
Received: from [68.239.159.99] (helo=mail.sys)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlZgz-0004fg-Ar
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 16:52:30 -0400
Received: by mail.sys (Postfix, from userid 501)
	id 992E92A7F2; Fri, 16 Jul 2004 16:52:05 -0400 (EDT)
Date: Fri, 16 Jul 2004 16:52:05 -0400
From: David Sugar <dyfet@ostel.com>
To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
Message-ID: <20040716205205.GA25303@ostel.com>
References: <40F76AAB.7050404@uidaho.edu>
	<1848068218.20040716151125@dezcom.mephi.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1848068218.20040716151125@dezcom.mephi.ru>
User-Agent: Mutt/1.5.5.1i
Cc: bug-commoncpp@gnu.org
Subject: Re: Patch to add std::string support back into the Persistence
	Engine
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2004 20:55:11 -0000

This patch looks like it's built against an older source tree, since it 
refers to CCXX_MEMBER_EXPORT macros which we no longer activily use...

Andrey Kulikov wrote:

> Hello Chad,
> 
> CY> Attached is a patch to persist.h and engine.cpp to be applied directly
> CY> to the CVS version.  It adds back support for std::string to the 
> CY> Persistence Engine.  This support was removed (I believe on accident)
> CY> when a library wide change was made to ost::String.
> 
> CY> I will be submitting a series of patches to things mentioned in my
> CY> previous post in order to provide my changes  piecemeal for your 
> CY> consideration.
> 
> Great!
> And what about std::wstring?
> 
> -- 
> Best regards,
>  Andrey                            mailto:ilfis@dezcom.mephi.ru
> 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp



From MAILER-DAEMON Fri Jul 16 18:25:46 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1Blb9G-0003AQ-5b
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 18:25:46 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Blb9D-0003AC-SE
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 18:25:43 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Blb9C-0003A0-4e
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 18:25:43 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Blb9C-00039x-1s
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 18:25:42 -0400
Received: from [129.101.155.251] (helo=mailB.its.uidaho.edu)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Blb6W-00054Z-0T
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 18:22:56 -0400
Received: from falcon (falcon.advancement.uidaho.edu [129.101.69.98])
	by mailB.its.uidaho.edu (Go Vandals!)
	with SMTP id <0I0Y008CUU67NG@mailB.its.uidaho.edu> for
	bug-commoncpp@gnu.org; Fri, 16 Jul 2004 15:22:55 -0700 (PDT)
Date: Fri, 16 Jul 2004 15:22:55 -0700
From: Chad Yates <cyates@uidaho.edu>
In-reply-to: <20040716205205.GA25303@ostel.com>
To: David Sugar <dyfet@ostel.com>, Andrey Kulikov <ilfis@dezcom.mephi.ru>
Message-id: <NBBBJJODBJBNJFNIDDCNKEBJFFAA.cyates@uidaho.edu>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Content-type: multipart/signed;
	boundary="----=_NextPart_000_0310_01C46B48.C369BA80"; micalg=SHA1;
	protocol="application/x-pkcs7-signature"
Importance: Normal
X-Priority: 3 (Normal)
X-MSMail-priority: Normal
Cc: bug-commoncpp@gnu.org
Subject: RE: Patch to add std::string support back into the
	Persistence	Engine
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2004 22:25:44 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0310_01C46B48.C369BA80
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

After submitting the patch last night, I was digging around because
initially I patched 1.2.3 and thought it odd that there would be
differences with the way the exports were being done.  I patched against
cvs from sourceforge, and it appears that that source tree is out of date.
I chose that because it seemed to have the most activity (bug reports,
patches, etc).  Is savannah the "official" home of commoncpp?  if so, it
might be a good idea to point the sourceforge users to savannah for the
current source.  I think there are many that are confused as to "what
version they should be using"

I will checkout from savannah and re-apply the patch there, and all future
patches.

Thanks, and sorry for the confusion.

Chad

> -----Original Message-----
> From: bug-commoncpp-bounces+cyates=uidaho.edu@gnu.org
> [mailto:bug-commoncpp-bounces+cyates=uidaho.edu@gnu.org]On Behalf Of
> David Sugar
> Sent: Friday, July 16, 2004 1:52 PM
> To: Andrey Kulikov
> Cc: bug-commoncpp@gnu.org
> Subject: Re: Patch to add std::string support back into the Persistence
> Engine
>
>
> This patch looks like it's built against an older source tree, since it
> refers to CCXX_MEMBER_EXPORT macros which we no longer activily use...
>
> Andrey Kulikov wrote:
>
> > Hello Chad,
> >
> > CY> Attached is a patch to persist.h and engine.cpp to be
> applied directly
> > CY> to the CVS version.  It adds back support for std::string to the
> > CY> Persistence Engine.  This support was removed (I believe on
> accident)
> > CY> when a library wide change was made to ost::String.
> >
> > CY> I will be submitting a series of patches to things mentioned in my
> > CY> previous post in order to provide my changes  piecemeal for your
> > CY> consideration.
> >
> > Great!
> > And what about std::wstring?
> >
> > --
> > Best regards,
> >  Andrey                            mailto:ilfis@dezcom.mephi.ru
> >
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > Bug-commoncpp@gnu.org
> > http://lists.gnu.org/mailman/listinfo/bug-commoncpp
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp

------=_NextPart_000_0310_01C46B48.C369BA80
Content-Type: application/x-pkcs7-signature;
	name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIC0zCCAs8w
ggI4oAMCAQICAwt2CzANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt
YWlsIElzc3VpbmcgQ0EwHhcNMDQwMTEyMjA0MzUyWhcNMDUwMTExMjA0MzUyWjBDMR8wHQYDVQQD
ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSAwHgYJKoZIhvcNAQkBFhFjeWF0ZXNAdWlkYWhvLmVk
dTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPM3wz2oKuKwmsOgS1vfty5EAuoH65ZY
Q+DWAifvyJljLnhXTAsfPHxBw1K8rMSnW70eBGd0femiKZ2Ja66hF7hZdwODF4HpLcROGi1MQo9N
Ksvc8K2bvlEjbE/KbWUF59Ksj4ANAQZvb1O65QTMMkzPlSpsBtCS13ZSODUE3dM2QaPLhcKSvz+I
/k6iyFBEwX5Xyu0ASNGFJL2zQ0ydNPr0HTkPalg9EnCR0dZH5qViqIZewMPocjNa2nIvzleB2rn0
TiIwAeEFrebmmlARfnaC6kudgj3z0KqhyUG8qiud0maBGs2BSuaIUXgMpQGYYSI8ysFtRrVuxuiq
JFVylJcCAwEAAaMuMCwwHAYDVR0RBBUwE4ERY3lhdGVzQHVpZGFoby5lZHUwDAYDVR0TAQH/BAIw
ADANBgkqhkiG9w0BAQQFAAOBgQAL2F2noinFiWNuwdaAKanmxo4gmQ6zD6ykCm0pW5NqIBEA1BKI
bh+zwtQBFbkEFyn5kVbo+RmQQPvL+pkncXVZuRFxoGi/ZZn/sXOjt6JQa0IPfFRs9FTkb78DLe+t
X6/PsOUAoT9+jCUUtPC/4CggbpilVz9+/QdRjXGGtg6MIzGCAsUwggLBAgEBMGkwYjELMAkGA1UE
BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1Ro
YXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAgMLdgswCQYFKw4DAhoFAKCCATEwGAYJ
KoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDQwNzE2MjIyMjUzWjAjBgkq
hkiG9w0BCQQxFgQUt+h/r7DzeBDGKNNNoz6LrDnBVQIwWAYJKoZIhvcNAQkPMUswSTAKBggqhkiG
9w0DBzAOBggqhkiG9w0DAgICAIAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgwBwYFKw4DAhowCgYI
KoZIhvcNAgUweAYJKwYBBAGCNxAEMWswaTBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3Rl
IENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWls
IElzc3VpbmcgQ0ECAwt2CzANBgkqhkiG9w0BAQEFAASCAQDUHnwSIHiC4CmJSxVTygDqTBQLnJNs
LQeRpegFyrIADKjlbLteSIo18Cx+hskntMsAOsQpFzHwk4vR7QZpI78DSaxQkjy20s7XrKoM9XYa
NwShrHS0OFiSykTMnrkkpwaHQ76ycZBuao+zZosEnoTOs4ebcAIBpVT2SatSFNjlMZh9QzGAPl9R
QgIUaqzH2ZyRnoC9zFppLV1tYC+LAEYfVKne8CH/rRMhcTNEqNAIrzhlypnWqGXHNdIDffZhV2xd
87sXSMYdvengi8qDCRQe1GkDT2suwcpLDGtxbL1ocDFJ2hveTgx/SFfn84TESm6+KuSz1IDGJ+Ar
YCyI1g5vAAAAAAAA

------=_NextPart_000_0310_01C46B48.C369BA80--




From MAILER-DAEMON Fri Jul 16 22:46:47 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlfDq-0006XO-UM
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:46:46 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlfDo-0006XB-Li
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:46:44 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlfDm-0006Vl-RE
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:46:43 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlfDm-0006Vi-Cb
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:46:42 -0400
Received: from [68.239.159.99] (helo=mail.sys)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlfBC-0003vS-57
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:44:02 -0400
Received: by mail.sys (Postfix, from userid 501)
	id D26942A7F2; Fri, 16 Jul 2004 22:44:01 -0400 (EDT)
Date: Fri, 16 Jul 2004 22:44:01 -0400
From: David Sugar <dyfet@ostel.com>
To: Chad Yates <cyates@uidaho.edu>
Message-ID: <20040717024401.GA8992@ostel.com>
References: <20040716205205.GA25303@ostel.com>
	<NBBBJJODBJBNJFNIDDCNKEBJFFAA.cyates@uidaho.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <NBBBJJODBJBNJFNIDDCNKEBJFFAA.cyates@uidaho.edu>
User-Agent: Mutt/1.5.5.1i
Cc: bug-commoncpp@gnu.org
Subject: Re: Patch to add std::string support back into the
	Persistence	Engine
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jul 2004 02:46:44 -0000

You also need to use the "stable1" branch from Savannah.  But yes, we 
have it in cvs at Savannah.  Actually, we could try clearing sourceforge 
cvs or disabling it from the project...


Chad Yates wrote:

> After submitting the patch last night, I was digging around because
> initially I patched 1.2.3 and thought it odd that there would be
> differences with the way the exports were being done.  I patched against
> cvs from sourceforge, and it appears that that source tree is out of date.
> I chose that because it seemed to have the most activity (bug reports,
> patches, etc).  Is savannah the "official" home of commoncpp?  if so, it
> might be a good idea to point the sourceforge users to savannah for the
> current source.  I think there are many that are confused as to "what
> version they should be using"
> 
> I will checkout from savannah and re-apply the patch there, and all future
> patches.
> 
> Thanks, and sorry for the confusion.
> 
> Chad
> 
> > -----Original Message-----
> > From: bug-commoncpp-bounces+cyates=uidaho.edu@gnu.org
> > [mailto:bug-commoncpp-bounces+cyates=uidaho.edu@gnu.org]On Behalf Of
> > David Sugar
> > Sent: Friday, July 16, 2004 1:52 PM
> > To: Andrey Kulikov
> > Cc: bug-commoncpp@gnu.org
> > Subject: Re: Patch to add std::string support back into the Persistence
> > Engine
> >
> >
> > This patch looks like it's built against an older source tree, since it
> > refers to CCXX_MEMBER_EXPORT macros which we no longer activily use...
> >
> > Andrey Kulikov wrote:
> >
> > > Hello Chad,
> > >
> > > CY> Attached is a patch to persist.h and engine.cpp to be
> > applied directly
> > > CY> to the CVS version.  It adds back support for std::string to the
> > > CY> Persistence Engine.  This support was removed (I believe on
> > accident)
> > > CY> when a library wide change was made to ost::String.
> > >
> > > CY> I will be submitting a series of patches to things mentioned in my
> > > CY> previous post in order to provide my changes  piecemeal for your
> > > CY> consideration.
> > >
> > > Great!
> > > And what about std::wstring?
> > >
> > > --
> > > Best regards,
> > >  Andrey                            mailto:ilfis@dezcom.mephi.ru
> > >
> > >
> > >
> > > _______________________________________________
> > > Bug-commoncpp mailing list
> > > Bug-commoncpp@gnu.org
> > > http://lists.gnu.org/mailman/listinfo/bug-commoncpp
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > Bug-commoncpp@gnu.org
> > http://lists.gnu.org/mailman/listinfo/bug-commoncpp





From MAILER-DAEMON Fri Jul 16 23:26:16 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1Blfq4-00053O-Oo
	for mharc-bug-commoncpp@gnu.org; Fri, 16 Jul 2004 23:26:16 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Blfq3-00053A-GS
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 23:26:15 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Blfq2-00052y-EJ
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 23:26:15 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Blfq2-00052u-9i
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 23:26:14 -0400
Received: from [129.101.155.248] (helo=mx1.uidaho.edu)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.34) id 1BlfnN-0007Pc-9A
	for bug-commoncpp@gnu.org; Fri, 16 Jul 2004 23:23:29 -0400
Received: from mailA.its.uidaho.edu (mailA.its.uidaho.edu [129.101.155.252])
	by mx1.uidaho.edu (8.12.10/8.12.10) with ESMTP id i6H3NLYk017089
	for <bug-commoncpp@gnu.org>; Fri, 16 Jul 2004 20:23:27 -0700
Received: from [192.168.0.100] (w160200.wireless.fsr.net [64.126.160.200])
	by mailA.its.uidaho.edu (Go Vandals!)
	with ESMTPA id <0I0Z009HX82XHV@mailA.its.uidaho.edu> for
	bug-commoncpp@gnu.org; Fri, 16 Jul 2004 20:23:21 -0700 (PDT)
Date: Fri, 16 Jul 2004 20:21:28 -0700
From: Chad Yates <cyates@uidaho.edu>
In-reply-to: <40F76AAB.7050404@uidaho.edu>
To: bug-commoncpp@gnu.org
Message-id: <40F89B38.6020607@uidaho.edu>
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_90Nzs4Wg0WMo+7YLbF2nPg)"
X-Accept-Language: en-us, en
User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040708)
References: <40F76AAB.7050404@uidaho.edu>
X-Virus: False
X-SpamDetails: rule=notspam score=0 mlx=0 adultscore=0 adjust=0
	version=2.1.0-04070901
X-SpamScore: 0
Subject: Re: Patch to add std::string support back into the Persistence
	Engine
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jul 2004 03:26:15 -0000

This is a multi-part message in MIME format.

--Boundary_(ID_90Nzs4Wg0WMo+7YLbF2nPg)
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT

Lets try this again...  found out that current development is on the 
stable1 branch at savannah and not on the default MAIN branch.  away 
from commoncpp for a while and I just can't get back into the groove.

Attached is single unified patch for persist.h and engine.cpp

thanks for your patience.

Chad Yates wrote:

> Attached is a patch to persist.h and engine.cpp to be applied directly 
> to the CVS version.  It adds back support for std::string to the 
> Persistence Engine.  This support was removed (I believe on accident) 
> when a library wide change was made to ost::String.
>
> I will be submitting a series of patches to things mentioned in my 
> previous post in order to provide my changes  piecemeal for your 
> consideration.
>
> ,Chad
>
>------------------------------------------------------------------------
>
>Index: src/engine.cpp
>===================================================================
>RCS file: /cvsroot/cplusplus/commoncpp2/src/engine.cpp,v
>retrieving revision 1.1.1.1
>diff -u -r1.1.1.1 engine.cpp
>--- src/engine.cpp	15 Dec 2003 19:26:49 -0000	1.1.1.1
>+++ src/engine.cpp	16 Jul 2004 05:37:45 -0000
>@@ -265,7 +265,7 @@
> 		  uint32 classId = myClassMap.size();
> 		  myClassMap[object->getPersistenceID()] = classId;
> 		  write(classId);
>-		  write(object->getPersistenceID());
>+		  write(static_cast<String>(object->getPersistenceID()));
> 		}
> 	  else
> 		{
>@@ -416,6 +416,32 @@
>   delete[] buffer;
> }
> 
>+
>+/*
>+ * note, does not (yet?) throw an exception, but interface
>+ * prepared ..
>+ */
>+void Engine::write(const std::string& str) THROWS (Engine::Exception)
>+{
>+  assert(myOperationalMode == modeWrite);
>+  uint32 len = (uint32)str.length();
>+  write(len);
>+  writeBinary((uint8*)str.c_str(),len);
>+}
>+
>+void Engine::read(std::string& str) THROWS (Engine::Exception)
>+{
>+  assert(myOperationalMode == modeRead);
>+  uint32 len = 0;
>+  read(len);
>+  uint8 *buffer = new uint8[len+1];
>+  readBinary(buffer,len);
>+  buffer[len] = 0;
>+  str = (char*)buffer;
>+  delete[] buffer;
>+}
>+
>+
> #define CCXX_RE(ar,ob)   ar.read(ob); return ar
> #define CCXX_WE(ar,ob)   ar.write(ob); return ar
> 
>@@ -459,6 +485,9 @@
> CCXX_EXPORT(Engine&) operator >>( Engine& ar, String& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
> CCXX_EXPORT(Engine&) operator <<( Engine& ar, String ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
> 
>+CCXX_EXPORT(Engine&) operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
>+CCXX_EXPORT(Engine&) operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
>+
> CCXX_EXPORT(Engine&) operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception) {
> 	uint32 a; ar.read(a); ob=a==1;return ar;
> }
>  
>
>------------------------------------------------------------------------
>
>Index: include/cc++/persist.h
>===================================================================
>RCS file: /cvsroot/cplusplus/commoncpp2/include/cc++/persist.h,v
>retrieving revision 1.1.1.1
>diff -u -r1.1.1.1 persist.h
>--- include/cc++/persist.h	15 Dec 2003 19:27:12 -0000	1.1.1.1
>+++ include/cc++/persist.h	16 Jul 2004 05:38:17 -0000
>@@ -306,7 +306,9 @@
> 	void write(float i)  THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
> 	void write(double i) THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
> #undef CCXX_ENGINEWRITE_REF
>+
> 	CCXX_MEMBER_EXPORT(void) write(const String& str) THROWS (Exception);
>+	CCXX_MEMBER_EXPORT(void) write(const std::string& str) THROWS (Exception);
> 
> 	// Every write operation boils down to one or more of these
> 	CCXX_MEMBER_EXPORT(void) writeBinary(const uint8* data, const uint32 size) THROWS (Exception);
>@@ -342,6 +344,7 @@
> #undef CCXX_ENGINEREAD_REF
> 
> 	CCXX_MEMBER_EXPORT(void) read(String& str) THROWS (Exception);
>+	CCXX_MEMBER_EXPORT(void) read(std::string& str) THROWS (Exception);
> 
> 	// Every read operation boild down to one or more of these
> 	CCXX_MEMBER_EXPORT(void) readBinary(uint8* data, uint32 size) THROWS (Exception);
>@@ -459,6 +462,11 @@
> CCXX_EXPORT(Engine&) operator <<( Engine& ar, String ob)  THROWS (Engine::Exception);
> 
> /** @relates Engine */
>+CCXX_EXPORT(Engine&) operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception);
>+/** @relates Engine */
>+CCXX_EXPORT(Engine&) operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception);
>+
>+/** @relates Engine */
> CCXX_EXPORT(Engine&) operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception);
> /** @relates Engine */
> CCXX_EXPORT(Engine&) operator <<( Engine& ar, bool ob)  THROWS (Engine::Exception);
>@@ -579,7 +587,3 @@
>  * c-basic-offset: 8
>  * End:
>  */
>-
>-
>-
>-
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Bug-commoncpp mailing list
>Bug-commoncpp@gnu.org
>http://lists.gnu.org/mailman/listinfo/bug-commoncpp
>  
>


--Boundary_(ID_90Nzs4Wg0WMo+7YLbF2nPg)
Content-type: text/x-patch; name=add_stdstring_to_persist.patch
Content-transfer-encoding: 7BIT
Content-disposition: inline; filename=add_stdstring_to_persist.patch

Index: include/cc++/persist.h
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/include/cc++/persist.h,v
retrieving revision 1.11.4.7
diff -u -r1.11.4.7 persist.h
--- include/cc++/persist.h	14 Jun 2004 21:48:23 -0000	1.11.4.7
+++ include/cc++/persist.h	17 Jul 2004 03:17:06 -0000
@@ -312,7 +312,9 @@
 	void write(float i)  THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
 	void write(double i) THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
 #undef CCXX_ENGINEWRITE_REF
+
 	void write(const String& str) THROWS (Exception);
+	void write(const std::string& str) THROWS (Exception);
 
 	// Every write operation boils down to one or more of these
 	void writeBinary(const uint8* data, const uint32 size) THROWS (Exception);
@@ -348,6 +350,7 @@
 #undef CCXX_ENGINEREAD_REF
 
 	void read(String& str) THROWS (Exception);
+	void read(std::string& str) THROWS (Exception);
 
 	// Every read operation boild down to one or more of these
 	void readBinary(uint8* data, uint32 size) THROWS (Exception);
@@ -465,6 +468,11 @@
 __EXPORT Engine& operator <<( Engine& ar, String ob)  THROWS (Engine::Exception);
 
 /** @relates Engine */
+__EXPORT Engine& operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception);
+/** @relates Engine */
+__EXPORT Engine& operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception);
+
+/** @relates Engine */
 __EXPORT Engine& operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception);
 /** @relates Engine */
 __EXPORT Engine& operator <<( Engine& ar, bool ob)  THROWS (Engine::Exception);
@@ -585,7 +593,3 @@
  * c-basic-offset: 8
  * End:
  */
-
-
-
-
Index: src/engine.cpp
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/src/engine.cpp,v
retrieving revision 1.6.4.4
diff -u -r1.6.4.4 engine.cpp
--- src/engine.cpp	6 Jul 2004 21:55:05 -0000	1.6.4.4
+++ src/engine.cpp	17 Jul 2004 03:17:06 -0000
@@ -268,7 +268,7 @@
 		  uint32 classId = (uint32)myClassMap.size();
 		  myClassMap[object->getPersistenceID()] = classId;
 		  write(classId);
-		  write(object->getPersistenceID());
+		  write(static_cast<String>(object->getPersistenceID()));
 		}
 	  else
 		{
@@ -419,6 +419,30 @@
   delete[] buffer;
 }
 
+/*
+ * note, does not (yet?) throw an exception, but interface
+ * prepared ..
+ */
+void Engine::write(const std::string& str) THROWS (Engine::Exception)
+{
+  assert(myOperationalMode == modeWrite);
+  uint32 len = (uint32)str.length();
+  write(len);
+  writeBinary((uint8*)str.c_str(),len);
+}
+
+void Engine::read(std::string& str) THROWS (Engine::Exception)
+{
+  assert(myOperationalMode == modeRead);
+  uint32 len = 0;
+  read(len);
+  uint8 *buffer = new uint8[len+1];
+  readBinary(buffer,len);
+  buffer[len] = 0;
+  str = (char*)buffer;
+  delete[] buffer;
+}
+
 #define CCXX_RE(ar,ob)   ar.read(ob); return ar
 #define CCXX_WE(ar,ob)   ar.write(ob); return ar
 

--Boundary_(ID_90Nzs4Wg0WMo+7YLbF2nPg)--



From MAILER-DAEMON Sat Jul 17 01:03:20 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlhM0-0002sI-Er
	for mharc-bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:03:20 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlhLx-0002r7-G2
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:03:17 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlhLt-0002pM-M1
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:03:15 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlhLt-0002pJ-GY
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:03:13 -0400
Received: from [129.101.155.249] (helo=mx2.uidaho.edu)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.34) id 1BlhJC-0007Ps-Jk
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:00:27 -0400
Received: from mailA.its.uidaho.edu (mailA.its.uidaho.edu [129.101.155.252])
	by mx2.uidaho.edu (8.12.10/8.12.10) with ESMTP id i6H50O7Z011657
	for <bug-commoncpp@gnu.org>; Fri, 16 Jul 2004 22:00:25 -0700
Received: from [192.168.0.100] (w160200.wireless.fsr.net [64.126.160.200])
	by mailA.its.uidaho.edu (Go Vandals!)
	with ESMTPA id <0I0Z001DDCKJZG@mailA.its.uidaho.edu> for
	bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:00:19 -0700 (PDT)
Date: Fri, 16 Jul 2004 21:58:26 -0700
From: Chad Yates <cyates@uidaho.edu>
To: bug-commoncpp@gnu.org
Message-id: <40F8B1F2.3060706@uidaho.edu>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040708)
X-Virus: False
X-SpamDetails: rule=notspam score=0 mlx=0 adultscore=1 adjust=0
	version=2.1.0-04070901
X-SpamScore: 0
Subject: Patch to add sync() method to Engine and fixes for unit tests on
	Linux
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jul 2004 05:03:18 -0000

Attached is a patch to the Persistence Engine and cppunit test suite:

  - Added a new sync() method to Engine using code from ~Engine.

  - Added implementations for std::string << and >> operators (was 
overlooked in  last patch as I was juggling 3 source trees)

  - Applies various fixes/updates to the ccxx_tests cppunit test suite.  
The tests that are active, should compile and run successfully under 
Linux now.

Cheers,

Chad



From MAILER-DAEMON Sat Jul 17 01:06:47 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlhPK-0003kB-SQ
	for mharc-bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:06:46 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlhPJ-0003jl-7x
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:06:45 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlhPI-0003jZ-EM
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:06:45 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlhPI-0003jP-Bd
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:06:44 -0400
Received: from [129.101.155.249] (helo=mx2.uidaho.edu)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.34) id 1BlhMF-0007ng-Ha
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:03:36 -0400
Received: from mailA.its.uidaho.edu (mailA.its.uidaho.edu [129.101.155.252])
	by mx2.uidaho.edu (8.12.10/8.12.10) with ESMTP id i6H53S7Z012826
	for <bug-commoncpp@gnu.org>; Fri, 16 Jul 2004 22:03:28 -0700
Received: from [192.168.0.100] (w160200.wireless.fsr.net [64.126.160.200])
	by mailA.its.uidaho.edu (Go Vandals!)
	with ESMTPA id <0I0Z001OHCPRZG@mailA.its.uidaho.edu> for
	bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:03:28 -0700 (PDT)
Date: Fri, 16 Jul 2004 22:01:35 -0700
From: Chad Yates <cyates@uidaho.edu>
In-reply-to: <40F8B1F2.3060706@uidaho.edu>
Cc: bug-commoncpp@gnu.org
Message-id: <40F8B2AF.6070807@uidaho.edu>
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_9hsFj1updbOtsc04R8bjqA)"
X-Accept-Language: en-us, en
User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040708)
References: <40F8B1F2.3060706@uidaho.edu>
X-Virus: False
X-SpamDetails: rule=notspam score=0 mlx=0 adultscore=0 adjust=0
	version=2.1.0-04070901
X-SpamScore: 0
Subject: Re: Patch to add sync() method to Engine and fixes for unit tests on
 Linux
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jul 2004 05:06:45 -0000

This is a multi-part message in MIME format.

--Boundary_(ID_9hsFj1updbOtsc04R8bjqA)
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT

Flip! here it is.

Chad Yates wrote:

> Attached is a patch to the Persistence Engine and cppunit test suite:
>
>  - Added a new sync() method to Engine using code from ~Engine.
>
>  - Added implementations for std::string << and >> operators (was 
> overlooked in  last patch as I was juggling 3 source trees)
>
>  - Applies various fixes/updates to the ccxx_tests cppunit test 
> suite.  The tests that are active, should compile and run successfully 
> under Linux now.
>
> Cheers,
>
> Chad
>


--Boundary_(ID_9hsFj1updbOtsc04R8bjqA)
Content-type: text/x-patch; name=add_sync_to_engine_and_fix_unit_tests.patch
Content-transfer-encoding: 7BIT
Content-disposition: inline;
	filename=add_sync_to_engine_and_fix_unit_tests.patch

Index: tests/SampleObject.h
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/tests/SampleObject.h,v
retrieving revision 1.1.6.1
diff -u -r1.1.6.1 SampleObject.h
--- tests/SampleObject.h	17 Jan 2004 11:51:02 -0000	1.1.6.1
+++ tests/SampleObject.h	17 Jul 2004 04:50:45 -0000
@@ -45,7 +45,6 @@
 #include <iterator>
 #include "SampleSubObject.h"
 
-using namespace ost;
 using std::cout;
 using std::endl;
 using std::string;
Index: tests/Test_Date.h
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_Date.h,v
retrieving revision 1.3.4.1
diff -u -r1.3.4.1 Test_Date.h
--- tests/Test_Date.h	17 Jan 2004 11:51:02 -0000	1.3.4.1
+++ tests/Test_Date.h	17 Jul 2004 04:50:45 -0000
@@ -88,10 +88,13 @@
     exp_dayofweek = 1;
 
     std::stringstream tmp;
-    tmp << exp_year << std::setfill('0') << std::setw(2) << exp_month << std::setw(2) << exp_day;
+    tmp << exp_year << "-" << std::setfill('0') << std::setw(2) << exp_month << "-" << std::setw(2) << exp_day;
     exp_stringdate = tmp.str();
-    exp_value = atoi(exp_stringdate.c_str());
-
+    
+    std::stringstream tmp2;
+    tmp2 << exp_year << std::setfill('0') << std::setw(2) << exp_month << std::setw(2) << exp_day;
+    exp_value = atoi(tmp2.str().c_str());
+    
     // make a ctime style datetime stamp
 	  memset(&exp_dt, 0, sizeof(exp_dt));
     exp_dt.tm_year = exp_year - 1900;  // years since 1900
@@ -184,4 +187,3 @@
   }
 
 };
-
Index: tests/Test_Engine.cpp
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_Engine.cpp,v
retrieving revision 1.1.6.1
diff -u -r1.1.6.1 Test_Engine.cpp
--- tests/Test_Engine.cpp	17 Jan 2004 11:51:02 -0000	1.1.6.1
+++ tests/Test_Engine.cpp	17 Jul 2004 04:50:45 -0000
@@ -107,12 +107,13 @@
   TEST_PRIMITIVE_OUTPUT(uint16, 0x0123);
   TEST_PRIMITIVE_OUTPUT(int32, 0x01234567);
   TEST_PRIMITIVE_OUTPUT(uint32, 0x01234567);
-  TEST_PRIMITIVE_OUTPUT(int64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
-  TEST_PRIMITIVE_OUTPUT(uint64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
+  //TEST_PRIMITIVE_OUTPUT(int64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
+  //TEST_PRIMITIVE_OUTPUT(uint64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
   TEST_PRIMITIVE_OUTPUT(float, 3.141592653589793238462643f);
   TEST_PRIMITIVE_OUTPUT(double, 3.141592653589793238462643);
   TEST_PRIMITIVE_OUTPUT(string, "abcdefghijklmnopqrstuvwxyz0123456789");
 
+  outputEngine.sync(); // flush Engine buffers before closing file
   outputArchive.close();
 
   // read primitive types back in and check
@@ -125,8 +126,8 @@
   TEST_PRIMITIVE_INPUT(uint16);
   TEST_PRIMITIVE_INPUT(int32);
   TEST_PRIMITIVE_INPUT(uint32);
-  TEST_PRIMITIVE_INPUT(int64);
-  TEST_PRIMITIVE_INPUT(uint64);
+  //TEST_PRIMITIVE_INPUT(int64);
+  //TEST_PRIMITIVE_INPUT(uint64);
   TEST_PRIMITIVE_INPUT(float);
   TEST_PRIMITIVE_INPUT(double);
   TEST_PRIMITIVE_INPUT(string);
@@ -148,6 +149,7 @@
     binaryBuffer[i] = i;
 
   outputEngine.writeBinary((const uint8*) binaryBuffer, sizeof(binaryBuffer));
+  outputEngine.sync(); // flush Engine buffers before closing file
   outputArchive.close();
 
   // read binary data back in and check
@@ -180,6 +182,7 @@
 
   outputEngine << intVector;
   outputEngine << *pIntVector;
+  outputEngine.sync(); // flush Engine buffers before closing file
   outputArchive.close();
 
   // read STL std::vector back in and check
@@ -218,6 +221,7 @@
 
   outputEngine << intDeque;
   outputEngine << *pIntDeque;
+  outputEngine.sync(); // flush Engine buffers before closing file
   outputArchive.close();
 
   // read STL std::deque back in and check
@@ -256,6 +260,7 @@
 
   outputEngine << intMap;
   outputEngine << *pIntMap;
+  outputEngine.sync(); // flush Engine buffers before closing file
   outputArchive.close();
 
   // read STL std::map back in and check
@@ -282,6 +287,7 @@
   std::fstream outputArchive("EngineComplexObjectTest.dat", std::ios::out|std::ios::binary);
   Engine outputEngine(outputArchive, ost::Engine::modeWrite);
   outputEngine << complexObject;
+  outputEngine.sync(); // flush Engine buffers before closing file
   outputArchive.close();
 
   // Unpersist a new object structure into an uninitialized object
@@ -321,6 +327,7 @@
     std::fstream inputArchive("EngineComplexObjectTest.dat", std::ios::in);
     Engine inputEngine(inputArchive, ost::Engine::modeRead);
     inputEngine >> myObjAllocatedPtr;
+    outputEngine.sync(); // flush Engine buffers before closing file
     inputArchive.close();
 
     CPPUNIT_ASSERT_MESSAGE("Unpersisted into pre-allocated pointer", *myObjAllocatedPtr == complexObject);
Index: tests/Test_Engine.h
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_Engine.h,v
retrieving revision 1.1.6.1
diff -u -r1.1.6.1 Test_Engine.h
--- tests/Test_Engine.h	17 Jan 2004 11:51:02 -0000	1.1.6.1
+++ tests/Test_Engine.h	17 Jul 2004 04:50:45 -0000
@@ -141,4 +141,3 @@
    */
   void testModeExceptions();
 };
-
Index: tests/Test_TCPStream.h
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_TCPStream.h,v
retrieving revision 1.1.6.1
diff -u -r1.1.6.1 Test_TCPStream.h
--- tests/Test_TCPStream.h	17 Jan 2004 11:51:02 -0000	1.1.6.1
+++ tests/Test_TCPStream.h	17 Jul 2004 04:50:45 -0000
@@ -68,22 +68,23 @@
 
   void testIsPending()
   {
+    /* FIXME hanging after recent changes to isPending?
     try
-	    {
-		    // Just connect to a port that won't send data -- doesn't matter what
-		    ost::TCPStream foo("10.0.0.5",5800,512,true,100);
-		    for(unsigned int i = 0; i < 50 ; i++)
-		    {
-			    while( foo.isPending(ost::Socket::pendingInput,100));
-		    }
-
-        CPPUNIT_ASSERT(true);
-	    }
-	    catch( ost::Socket* s )
-	    {
-        CPPUNIT_ASSERT_MESSAGE("Socket error", true);
-	    }
+    {
+      // Just connect to a port that won't send data -- doesn't matter what
+      ost::TCPStream foo(ost::IPV4Host("10.0.0.5"),5800,512,true,100);
+      for(unsigned int i = 0; i < 5 ; i++)
+      {
+        while( foo.isPending(ost::Socket::pendingInput,100));
+      }
+    
+      CPPUNIT_ASSERT(true);
+    }
+    catch( ost::Socket* s )
+    {
+      CPPUNIT_ASSERT_MESSAGE("Socket error", true);
+    }
+    */
   }
   
-};
-
+};
Index: tests/Test_URLString.h
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_URLString.h,v
retrieving revision 1.3.4.1
diff -u -r1.3.4.1 Test_URLString.h
--- tests/Test_URLString.h	17 Jan 2004 11:51:02 -0000	1.3.4.1
+++ tests/Test_URLString.h	17 Jul 2004 04:50:45 -0000
@@ -40,7 +40,7 @@
 
 #include <cppunit/extensions/HelperMacros.h>
 #include <iostream>
-#include <cc++/urlstring.h>
+#include <cc++/url.h>
 
 using namespace ost;
 using std::string;
@@ -112,8 +112,8 @@
 
   void testStringVersion()
   {
-    CPPUNIT_ASSERT_EQUAL(string("VGhpcyBpcyBhIHRlc3Qu"), b64Encode(string("This is a test.")));
-    CPPUNIT_ASSERT_EQUAL(string("This is a test."), b64Decode(string("VGhpcyBpcyBhIHRlc3Qu")));
+    CPPUNIT_ASSERT_EQUAL(String("VGhpcyBpcyBhIHRlc3Qu"), b64Encode(String("This is a test.")));
+    CPPUNIT_ASSERT_EQUAL(String("This is a test."), b64Decode(String("VGhpcyBpcyBhIHRlc3Qu")));
   }
 
   void testTypicalTextBase64EncodeDecode()
Index: include/cc++/persist.h
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/include/cc++/persist.h,v
retrieving revision 1.11.4.7
diff -u -r1.11.4.7 persist.h
--- include/cc++/persist.h	14 Jun 2004 21:48:23 -0000	1.11.4.7
+++ include/cc++/persist.h	17 Jul 2004 04:50:45 -0000
@@ -46,6 +46,14 @@
 #ifndef	CCXX_PERSIST_H_
 #define	CCXX_PERSIST_H_
 
+#ifndef CCXX_CONFIG_H_
+#include <cc++/config.h>
+#endif
+
+#ifndef CCXX_EXCEPTIONS_H_
+#include <cc++/exception.h>
+#endif
+
 #ifndef CCXX_MISSING_H_
 #include <cc++/missing.h>
 #endif
@@ -280,6 +288,8 @@
 	 * This Flushes the buffers and closes the Persistence::Engine
 	 * this must happen before the underlying stream is shut down
 	 */
+  void sync();
+  
 	virtual ~Engine();
 
 
@@ -312,7 +322,9 @@
 	void write(float i)  THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
 	void write(double i) THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
 #undef CCXX_ENGINEWRITE_REF
+
 	void write(const String& str) THROWS (Exception);
+	void write(const std::string& str) THROWS (Exception);
 
 	// Every write operation boils down to one or more of these
 	void writeBinary(const uint8* data, const uint32 size) THROWS (Exception);
@@ -348,6 +360,7 @@
 #undef CCXX_ENGINEREAD_REF
 
 	void read(String& str) THROWS (Exception);
+	void read(std::string& str) THROWS (Exception);
 
 	// Every read operation boild down to one or more of these
 	void readBinary(uint8* data, uint32 size) THROWS (Exception);
@@ -465,6 +478,11 @@
 __EXPORT Engine& operator <<( Engine& ar, String ob)  THROWS (Engine::Exception);
 
 /** @relates Engine */
+__EXPORT Engine& operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception);
+/** @relates Engine */
+__EXPORT Engine& operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception);
+
+/** @relates Engine */
 __EXPORT Engine& operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception);
 /** @relates Engine */
 __EXPORT Engine& operator <<( Engine& ar, bool ob)  THROWS (Engine::Exception);
@@ -585,7 +603,3 @@
  * c-basic-offset: 8
  * End:
  */
-
-
-
-
Index: src/engine.cpp
===================================================================
RCS file: /cvsroot/commoncpp/commoncpp2/src/engine.cpp,v
retrieving revision 1.6.4.4
diff -u -r1.6.4.4 engine.cpp
--- src/engine.cpp	6 Jul 2004 21:55:05 -0000	1.6.4.4
+++ src/engine.cpp	17 Jul 2004 04:50:45 -0000
@@ -109,8 +109,7 @@
 #endif
 }
 
-
-Engine::~Engine()
+void Engine::sync()
 {
   // Flush compression buffers etc here.
 #ifndef NO_COMPRESSION
@@ -133,11 +132,17 @@
 		}
 	  deflateEnd(&myZStream);
 	}
-  delete [] myCompressedDataBuffer;
-  delete [] myUncompressedDataBuffer;
 #endif
 }
 
+Engine::~Engine()
+{
+  if (myUnderlyingStream.good())
+    sync();
+
+  delete [] myCompressedDataBuffer;
+  delete [] myUncompressedDataBuffer;
+}
 
 void Engine::writeBinary(const uint8* data, const uint32 size) 
 	THROWS (Engine::Exception)
@@ -268,7 +273,7 @@
 		  uint32 classId = (uint32)myClassMap.size();
 		  myClassMap[object->getPersistenceID()] = classId;
 		  write(classId);
-		  write(object->getPersistenceID());
+		  write(static_cast<String>(object->getPersistenceID()));
 		}
 	  else
 		{
@@ -309,7 +314,7 @@
   // we won't need it later since this object is already allocated
   readClass();
   
-	// Okay then - we can read data straight into this object
+  // Okay then - we can read data straight into this object
   readObject(&object);
 }
 
@@ -419,6 +424,30 @@
   delete[] buffer;
 }
 
+/*
+ * note, does not (yet?) throw an exception, but interface
+ * prepared ..
+ */
+void Engine::write(const std::string& str) THROWS (Engine::Exception)
+{
+  assert(myOperationalMode == modeWrite);
+  uint32 len = (uint32)str.length();
+  write(len);
+  writeBinary((uint8*)str.c_str(),len);
+}
+
+void Engine::read(std::string& str) THROWS (Engine::Exception)
+{
+  assert(myOperationalMode == modeRead);
+  uint32 len = 0;
+  read(len);
+  uint8 *buffer = new uint8[len+1];
+  readBinary(buffer,len);
+  buffer[len] = 0;
+  str = (char*)buffer;
+  delete[] buffer;
+}
+
 #define CCXX_RE(ar,ob)   ar.read(ob); return ar
 #define CCXX_WE(ar,ob)   ar.write(ob); return ar
 
@@ -462,6 +491,9 @@
 CCXX_EXPORT(Engine&) operator >>( Engine& ar, String& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
 CCXX_EXPORT(Engine&) operator <<( Engine& ar, String ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
 
+CCXX_EXPORT(Engine&) operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
+CCXX_EXPORT(Engine&) operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
+
 CCXX_EXPORT(Engine&) operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception) {
 	uint32 a; ar.read(a); ob=a==1;return ar;
 }

--Boundary_(ID_9hsFj1updbOtsc04R8bjqA)--



From MAILER-DAEMON Sat Jul 17 01:45:45 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1Bli13-0000sY-CI
	for mharc-bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:45:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Bli11-0000sL-Rq
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:45:43 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Bli11-0000s8-59
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:45:43 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Bli11-0000s5-2C
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:45:43 -0400
Received: from [129.101.155.248] (helo=mx1.uidaho.edu)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.34) id 1Blhxo-0002RQ-73
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 01:42:24 -0400
Received: from mailA.its.uidaho.edu (mailA.its.uidaho.edu [129.101.155.252])
	by mx1.uidaho.edu (8.12.10/8.12.10) with ESMTP id i6H5gMYk009714
	for <bug-commoncpp@gnu.org>; Fri, 16 Jul 2004 22:42:22 -0700
Received: from [192.168.0.100] (w160200.wireless.fsr.net [64.126.160.200])
	by mailA.its.uidaho.edu (Go Vandals!)
	with ESMTPA id <0I0Z001XHEILZG@mailA.its.uidaho.edu> for
	bug-commoncpp@gnu.org; Fri, 16 Jul 2004 22:42:22 -0700 (PDT)
Date: Fri, 16 Jul 2004 22:40:28 -0700
From: Chad Yates <cyates@uidaho.edu>
To: bug-commoncpp@gnu.org
Message-id: <40F8BBCC.8000406@uidaho.edu>
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_iSCYb4tkuPdM1sbpTrYi0Q)"
X-Accept-Language: en-us, en
User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040708)
X-Virus: False
X-SpamDetails: rule=notspam score=0 mlx=0 adultscore=0 adjust=0
	version=2.1.0-04070901
X-SpamScore: 0
Subject: Patch to convert assert statements in Engine to exceptions when
 available
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jul 2004 05:45:44 -0000

This is a multi-part message in MIME format.

--Boundary_(ID_iSCYb4tkuPdM1sbpTrYi0Q)
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT

Attached is a patch.

  - removed unnecessary Engine mode asserts statements
  - converted assert statements in readBinary/writeBinary to exceptions 
using the THROW macro. these should be the only necessary checkpoints as 
all reads end in calls to these to do the actual i/o.
  - ran expand -t 2 on it to clean up inconsistent tab vs 2 space 
indentation.  what is the standard anyway? tabs or spaces?

It would be nice to change the THROW macro to output the string in the 
case of a system with no exceptions:

from:
  #define THROW(x) abort()
to:
  #define THROW(x) std::cerr << x << std::endl; abort();

But I don't know if that would negatively affect any "non-string" calls, 
assuming there are any.

,Chad

--Boundary_(ID_iSCYb4tkuPdM1sbpTrYi0Q)
Content-type: text/x-patch; name=convert_asserts_in_engine_to_exceptions.patch
Content-transfer-encoding: 7BIT
Content-disposition: inline;
	filename=convert_asserts_in_engine_to_exceptions.patch

45c45
< #if	!defined(_MSC_VER) || _MSC_VER >= 1300
---
> #if !defined(_MSC_VER) || _MSC_VER >= 1300
48a49
> #ifndef HAVE_EXCEPTION
49a51
> #endif
51c53
< #ifdef	CCXX_NAMESPACES
---
> #ifdef  CCXX_NAMESPACES
60c62
< #ifdef	CCXX_EXCEPTIONS
---
> #ifdef  CCXX_EXCEPTIONS
62c64
< 	PersistException(reason) 
---
>   PersistException(reason) 
77c79
< 	: myUnderlyingStream(stream), myOperationalMode(mode)
---
>   : myUnderlyingStream(stream), myOperationalMode(mode)
88,97c90,99
< 	{
< 	  myZStream.next_in = myCompressedDataBuffer;
< 	  myZStream.next_out = myUncompressedDataBuffer;
< 	  myZStream.avail_in = 0;
< 	  myZStream.avail_out = MAX_BUFFER;
< 	  int err = inflateInit(&myZStream);
< 	  if (err != Z_OK) {
< 		  THROW (PersistException(String("zLib didn't initialise for inflating.")));
< 	  }
< 	}
---
>   {
>     myZStream.next_in = myCompressedDataBuffer;
>     myZStream.next_out = myUncompressedDataBuffer;
>     myZStream.avail_in = 0;
>     myZStream.avail_out = MAX_BUFFER;
>     int err = inflateInit(&myZStream);
>     if (err != Z_OK) {
>       THROW (PersistException(String("zLib didn't initialise for inflating.")));
>     }
>   }
99,108c101,110
< 	{
< 	  myZStream.next_in = myUncompressedDataBuffer;
< 	  myZStream.next_out = myCompressedDataBuffer;
< 	  myZStream.avail_in = 0;
< 	  myZStream.avail_out = MAX_BUFFER;
< 	  int err = deflateInit(&myZStream,9); // TODO: tweak compression level
< 	  if (err != Z_OK) {
< 		  THROW ( PersistException(String("zLib didn't initialise for deflating.")));
< 	  }
< 	}
---
>   {
>     myZStream.next_in = myUncompressedDataBuffer;
>     myZStream.next_out = myCompressedDataBuffer;
>     myZStream.avail_in = 0;
>     myZStream.avail_out = MAX_BUFFER;
>     int err = deflateInit(&myZStream,9); // TODO: tweak compression level
>     if (err != Z_OK) {
>       THROW ( PersistException(String("zLib didn't initialise for deflating.")));
>     }
>   }
117,119c119,121
< 	{
< 	  inflateEnd(&myZStream);
< 	}
---
>   {
>     inflateEnd(&myZStream);
>   }
121,134c123,136
< 	{
< 	  int zret = Z_OK;
< 	  while (myZStream.avail_in > 0 || zret == Z_OK)
< 		{
< 		  zret = deflate(&myZStream,Z_FINISH);
< 		  if (myZStream.avail_out >= 0)
< 			{
< 			  myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER - myZStream.avail_out);
< 			  myZStream.next_out = myCompressedDataBuffer;
< 			  myZStream.avail_out = MAX_BUFFER;
< 			}
< 		}
< 	  deflateEnd(&myZStream);
< 	}
---
>   {
>     int zret = Z_OK;
>     while (myZStream.avail_in > 0 || zret == Z_OK)
>     {
>       zret = deflate(&myZStream,Z_FINISH);
>       if (myZStream.avail_out >= 0)
>       {
>         myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER - myZStream.avail_out);
>         myZStream.next_out = myCompressedDataBuffer;
>         myZStream.avail_out = MAX_BUFFER;
>       }
>     }
>     deflateEnd(&myZStream);
>   }
148c150
< 	THROWS (Engine::Exception)
---
>   THROWS (Engine::Exception)
150c152,153
<   assert(myOperationalMode == modeWrite);
---
>   if(myOperationalMode != modeWrite)
>     THROW("Cannot write to an input Engine");
157,186c160,189
< 	{
< 	  // transfer as much information as we can into the input buffer.
< 	  if (myZStream.avail_in < MAX_BUFFER)
< 		{
< 		  uint32 toAdd = size - written;
< 		  if (toAdd > (MAX_BUFFER - myZStream.avail_in))
< 			toAdd = (MAX_BUFFER - myZStream.avail_in);
< 		  memcpy(myZStream.next_in + myZStream.avail_in, data+written,toAdd);
< 		  written += toAdd;
< 		  myZStream.avail_in += toAdd;
< 		}
< 	  if (myZStream.avail_in < MAX_BUFFER)
< 		return; // We have not filled the buffer, so let's carry on streaming
< 	  // We have a full input buffer, so we compressit.
< 	  while (myZStream.avail_in > 0)
< 		{
< 		  deflate(&myZStream,0);
< 		  if (myZStream.avail_out == 0)
< 			{
< 			  // We filled the output buffer, let's stream it
< 			  myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER);
< 			  myZStream.next_out = myCompressedDataBuffer;
< 			  myZStream.avail_out = MAX_BUFFER;
< 			}
< 		  // Repeat whilst the input buffer isn't flushed
< 		}
< 	  // Now we have flushed the input buffer we can reset it
< 	  myZStream.avail_in = 0;
< 	  myZStream.next_in = myUncompressedDataBuffer;
< 	}
---
>   {
>     // transfer as much information as we can into the input buffer.
>     if (myZStream.avail_in < MAX_BUFFER)
>     {
>       uint32 toAdd = size - written;
>       if (toAdd > (MAX_BUFFER - myZStream.avail_in))
>       toAdd = (MAX_BUFFER - myZStream.avail_in);
>       memcpy(myZStream.next_in + myZStream.avail_in, data+written,toAdd);
>       written += toAdd;
>       myZStream.avail_in += toAdd;
>     }
>     if (myZStream.avail_in < MAX_BUFFER)
>     return; // We have not filled the buffer, so let's carry on streaming
>     // We have a full input buffer, so we compressit.
>     while (myZStream.avail_in > 0)
>     {
>       deflate(&myZStream,0);
>       if (myZStream.avail_out == 0)
>       {
>         // We filled the output buffer, let's stream it
>         myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER);
>         myZStream.next_out = myCompressedDataBuffer;
>         myZStream.avail_out = MAX_BUFFER;
>       }
>       // Repeat whilst the input buffer isn't flushed
>     }
>     // Now we have flushed the input buffer we can reset it
>     myZStream.avail_in = 0;
>     myZStream.next_in = myUncompressedDataBuffer;
>   }
192c195,196
<   assert(myOperationalMode == modeRead);
---
>   if(myOperationalMode != modeRead)
>     THROW("Cannot read from an output Engine");
198,240c202,244
< 	{
< 	  // If we have any data left in the uncompressed buffer - use it
< 	  if (myLastUncompressedDataRead < myZStream.next_out)
< 		{
< 		  uint32 toRead = size - read;
< 		  if (toRead > (uint32)(myZStream.next_out - myLastUncompressedDataRead))
< 			toRead = (myZStream.next_out - myLastUncompressedDataRead);
< 		  memcpy(data+read,myLastUncompressedDataRead,toRead);
< 		  myLastUncompressedDataRead += toRead;
< 		  read += toRead;
< 		}
< 	  if (read == size)
< 		return; // We have read all we need to
< 	  // Reset the stream for the next block of data
< 	  myLastUncompressedDataRead = myUncompressedDataBuffer;
< 	  myZStream.next_out = myUncompressedDataBuffer;
< 	  myZStream.avail_out = MAX_BUFFER;
< 	  // Next we have to deal such that, until we have a full output buffer,
< 	  // (Or we run out of input)
< 	  if (myUnderlyingStream.good())
< 		{
< 		  while (myUnderlyingStream.good() && myZStream.avail_out > 0)
< 			{
< 			  // Right then, if we have run out of input, fetch another chunk
< 			  if (myZStream.avail_in == 0)
< 				{
< 				  myZStream.next_in = myCompressedDataBuffer;
< 				  myUnderlyingStream.read((char*)myCompressedDataBuffer,MAX_BUFFER);
< 				  myZStream.avail_in = myUnderlyingStream.gcount();
< 				}
< 			  inflate(&myZStream,0);
< 			}
< 		}
< 	  else
< 		{
< 		  // Oh dear - we ran out of input on the buffer.
< 		  // Maybe we can still inflate some
< 		  inflate(&myZStream,0);
< 		  if (myZStream.avail_out == MAX_BUFFER)
< //			  THROW (PersistException(String("Oh dear - ran out of input")));
< 			  THROW (Exception(String("Oh dear - ran out of input")));
< 		}
< 	}
---
>   {
>     // If we have any data left in the uncompressed buffer - use it
>     if (myLastUncompressedDataRead < myZStream.next_out)
>     {
>       uint32 toRead = size - read;
>       if (toRead > (uint32)(myZStream.next_out - myLastUncompressedDataRead))
>       toRead = (myZStream.next_out - myLastUncompressedDataRead);
>       memcpy(data+read,myLastUncompressedDataRead,toRead);
>       myLastUncompressedDataRead += toRead;
>       read += toRead;
>     }
>     if (read == size)
>     return; // We have read all we need to
>     // Reset the stream for the next block of data
>     myLastUncompressedDataRead = myUncompressedDataBuffer;
>     myZStream.next_out = myUncompressedDataBuffer;
>     myZStream.avail_out = MAX_BUFFER;
>     // Next we have to deal such that, until we have a full output buffer,
>     // (Or we run out of input)
>     if (myUnderlyingStream.good())
>     {
>       while (myUnderlyingStream.good() && myZStream.avail_out > 0)
>       {
>         // Right then, if we have run out of input, fetch another chunk
>         if (myZStream.avail_in == 0)
>         {
>           myZStream.next_in = myCompressedDataBuffer;
>           myUnderlyingStream.read((char*)myCompressedDataBuffer,MAX_BUFFER);
>           myZStream.avail_in = myUnderlyingStream.gcount();
>         }
>         inflate(&myZStream,0);
>       }
>     }
>     else
>     {
>       // Oh dear - we ran out of input on the buffer.
>       // Maybe we can still inflate some
>       inflate(&myZStream,0);
>       if (myZStream.avail_out == MAX_BUFFER)
> //        THROW (PersistException(String("Oh dear - ran out of input")));
>         THROW (Exception(String("Oh dear - ran out of input")));
>     }
>   }
250,251d253
<   assert(myOperationalMode == modeWrite);
< 
256,260c258,262
< 	{
< 	  uint32 id = NullObject;
< 	  write(id);
< 	  return;
< 	}
---
>   {
>     uint32 id = NullObject;
>     write(id);
>     return;
>   }
265,288c267,290
< 	{
< 	  // Unfortunately we need to serialise it - here we go ....
< 	  uint32 id = (uint32)myArchiveMap.size();
< 	  myArchiveMap[object] = id; // bumps id automatically for next one
< 	  write(id);
< 	  ClassMap::const_iterator classItor = myClassMap.find(object->getPersistenceID());
< 	  if (classItor == myClassMap.end())
< 		{
< 		  uint32 classId = (uint32)myClassMap.size();
< 		  myClassMap[object->getPersistenceID()] = classId;
< 		  write(classId);
< 		  write(static_cast<String>(object->getPersistenceID()));
< 		}
< 	  else
< 		{
< 		  write(classItor->second);
< 		}
< 	  String majik;
< 	  majik = "OBST";
< 	  write(majik);
< 	  object->write(*this);
< 	  majik = "OBEN";
< 	  write(majik);
< 	}
---
>   {
>     // Unfortunately we need to serialise it - here we go ....
>     uint32 id = (uint32)myArchiveMap.size();
>     myArchiveMap[object] = id; // bumps id automatically for next one
>     write(id);
>     ClassMap::const_iterator classItor = myClassMap.find(object->getPersistenceID());
>     if (classItor == myClassMap.end())
>     {
>       uint32 classId = (uint32)myClassMap.size();
>       myClassMap[object->getPersistenceID()] = classId;
>       write(classId);
>       write(static_cast<String>(object->getPersistenceID()));
>     }
>     else
>     {
>       write(classItor->second);
>     }
>     String majik;
>     majik = "OBST";
>     write(majik);
>     object->write(*this);
>     majik = "OBEN";
>     write(majik);
>   }
290,293c292,295
< 	{
< 	  // This object has been serialised, so just pop its ID out
< 	  write(itor->second);
< 	}
---
>   {
>     // This object has been serialised, so just pop its ID out
>     write(itor->second);
>   }
301d302
<   assert(myOperationalMode == modeRead);
304c305,306
<   assert(id != NullObject); // id should never be null for a reference
---
>   if (id == NullObject)
>     THROW("Object Id should not be NULL when unpersisting to a reference");
308,311c310,313
< 	{
< 	  object = *(myArchiveVector[id]);
< 	  return;
< 	}
---
>   {
>     object = *(myArchiveVector[id]);
>     return;
>   }
326d327
<   assert(myOperationalMode == modeRead);
331,334c332,335
< 	{
< 	  object = NULL;
< 	  return;
< 	}
---
>   {
>     object = NULL;
>     return;
>   }
338,341c339,342
< 	{
< 	  object = myArchiveVector[id];
< 	  return;
< 	}
---
>   {
>     object = myArchiveVector[id];
>     return;
>   }
356,357c357,358
< 	{
< 	  // Okay then - we can make this object
---
>   {
>     // Okay then - we can make this object
359c360
< 	}
---
>   }
361c362
< 	  THROW (Exception((String("Unable to instantiate object of class ")+className).c_str()));
---
>     THROW (Exception(String("Unable to instantiate object of class ")+className));
369,376c370,379
< 	// Okay then - we can make this object
< 	myArchiveVector.push_back(object);
< 	String majik;
< 	read(majik);
< 	assert(majik == String("OBST"));
< 	object->read(*this);
< 	read(majik);
< 	assert(majik == String("OBEN"));
---
>   // Okay then - we can make this object
>   myArchiveVector.push_back(object);
>   String majik;
>   read(majik);
>   if(majik != String("OBST"))
>     THROW("Missing Start-of-Object marker");
>   object->read(*this);
>   read(majik);
>   if(majik != String("OBEN"))
>     THROW("Missing End-of-Object marker");
389,391c392,394
< 	{
< 	  className = myClassVector[classId];
< 	}
---
>   {
>     className = myClassVector[classId];
>   }
393,397c396,400
< 	{
< 	  // Okay the class wasn't known yet - save its name
< 	  read(className);
< 	  myClassVector.push_back(className);
< 	}
---
>   {
>     // Okay the class wasn't known yet - save its name
>     read(className);
>     myClassVector.push_back(className);
>   }
409d411
<   assert(myOperationalMode == modeWrite);
417d418
<   assert(myOperationalMode == modeRead);
433d433
<   assert(myOperationalMode == modeWrite);
441d440
<   assert(myOperationalMode == modeRead);
477c476
< #ifdef	HAVE_64_BITS
---
> #ifdef  HAVE_64_BITS
498c497
< 	uint32 a; ar.read(a); ob=a==1;return ar;
---
>   uint32 a; ar.read(a); ob=a==1;return ar;
501c500
< 	uint32 a=ob?1:0; ar.write(a); return ar;
---
>   uint32 a=ob?1:0; ar.write(a); return ar;
507c506
< #ifdef	CCXX_NAMESPACES
---
> #ifdef  CCXX_NAMESPACES

--Boundary_(ID_iSCYb4tkuPdM1sbpTrYi0Q)--



From MAILER-DAEMON Sat Jul 17 09:02:30 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1Blopi-0003iI-6b
	for mharc-bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:02:30 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Blopf-0003iA-Vm
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:02:28 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Blopf-0003hx-3E
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:02:27 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Blopd-0003ht-Pd
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:02:27 -0400
Received: from [68.239.159.99] (helo=mail.sys)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Blomv-0002Ki-0s
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 08:59:38 -0400
Received: by mail.sys (Postfix, from userid 501)
	id A8D062A7F2; Sat, 17 Jul 2004 08:59:36 -0400 (EDT)
Date: Sat, 17 Jul 2004 08:59:36 -0400
From: David Sugar <dyfet@ostel.com>
To: Chad Yates <cyates@uidaho.edu>
Message-ID: <20040717125936.GA32673@ostel.com>
References: <40F8B1F2.3060706@uidaho.edu> <40F8B2AF.6070807@uidaho.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <40F8B2AF.6070807@uidaho.edu>
User-Agent: Mutt/1.5.5.1i
Cc: bug-commoncpp@gnu.org
Subject: Re: Patch to add sync() method to Engine and fixes for unit tests
	on Linux
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jul 2004 13:02:28 -0000

This one seemed to supercede the first one as it also had the same 
header fixes for persist.h and would conflict.  But I was able to apply 
this one alone and build successfully.

Chad Yates wrote:

> Flip! here it is.
> 
> Chad Yates wrote:
> 
> >Attached is a patch to the Persistence Engine and cppunit test suite:
> >
> > - Added a new sync() method to Engine using code from ~Engine.
> >
> > - Added implementations for std::string << and >> operators (was 
> >overlooked in  last patch as I was juggling 3 source trees)
> >
> > - Applies various fixes/updates to the ccxx_tests cppunit test 
> >suite.  The tests that are active, should compile and run successfully 
> >under Linux now.
> >
> >Cheers,
> >
> >Chad
> >
> 

> Index: tests/SampleObject.h
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/tests/SampleObject.h,v
> retrieving revision 1.1.6.1
> diff -u -r1.1.6.1 SampleObject.h
> --- tests/SampleObject.h	17 Jan 2004 11:51:02 -0000	1.1.6.1
> +++ tests/SampleObject.h	17 Jul 2004 04:50:45 -0000
> @@ -45,7 +45,6 @@
>  #include <iterator>
>  #include "SampleSubObject.h"
>  
> -using namespace ost;
>  using std::cout;
>  using std::endl;
>  using std::string;
> Index: tests/Test_Date.h
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_Date.h,v
> retrieving revision 1.3.4.1
> diff -u -r1.3.4.1 Test_Date.h
> --- tests/Test_Date.h	17 Jan 2004 11:51:02 -0000	1.3.4.1
> +++ tests/Test_Date.h	17 Jul 2004 04:50:45 -0000
> @@ -88,10 +88,13 @@
>      exp_dayofweek = 1;
>  
>      std::stringstream tmp;
> -    tmp << exp_year << std::setfill('0') << std::setw(2) << exp_month << std::setw(2) << exp_day;
> +    tmp << exp_year << "-" << std::setfill('0') << std::setw(2) << exp_month << "-" << std::setw(2) << exp_day;
>      exp_stringdate = tmp.str();
> -    exp_value = atoi(exp_stringdate.c_str());
> -
> +    
> +    std::stringstream tmp2;
> +    tmp2 << exp_year << std::setfill('0') << std::setw(2) << exp_month << std::setw(2) << exp_day;
> +    exp_value = atoi(tmp2.str().c_str());
> +    
>      // make a ctime style datetime stamp
>  	  memset(&exp_dt, 0, sizeof(exp_dt));
>      exp_dt.tm_year = exp_year - 1900;  // years since 1900
> @@ -184,4 +187,3 @@
>    }
>  
>  };
> -
> Index: tests/Test_Engine.cpp
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_Engine.cpp,v
> retrieving revision 1.1.6.1
> diff -u -r1.1.6.1 Test_Engine.cpp
> --- tests/Test_Engine.cpp	17 Jan 2004 11:51:02 -0000	1.1.6.1
> +++ tests/Test_Engine.cpp	17 Jul 2004 04:50:45 -0000
> @@ -107,12 +107,13 @@
>    TEST_PRIMITIVE_OUTPUT(uint16, 0x0123);
>    TEST_PRIMITIVE_OUTPUT(int32, 0x01234567);
>    TEST_PRIMITIVE_OUTPUT(uint32, 0x01234567);
> -  TEST_PRIMITIVE_OUTPUT(int64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
> -  TEST_PRIMITIVE_OUTPUT(uint64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
> +  //TEST_PRIMITIVE_OUTPUT(int64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
> +  //TEST_PRIMITIVE_OUTPUT(uint64, 0x0123456789ABCDEF); // warning: integer constant larger than the maximum value of an unsigned long int
>    TEST_PRIMITIVE_OUTPUT(float, 3.141592653589793238462643f);
>    TEST_PRIMITIVE_OUTPUT(double, 3.141592653589793238462643);
>    TEST_PRIMITIVE_OUTPUT(string, "abcdefghijklmnopqrstuvwxyz0123456789");
>  
> +  outputEngine.sync(); // flush Engine buffers before closing file
>    outputArchive.close();
>  
>    // read primitive types back in and check
> @@ -125,8 +126,8 @@
>    TEST_PRIMITIVE_INPUT(uint16);
>    TEST_PRIMITIVE_INPUT(int32);
>    TEST_PRIMITIVE_INPUT(uint32);
> -  TEST_PRIMITIVE_INPUT(int64);
> -  TEST_PRIMITIVE_INPUT(uint64);
> +  //TEST_PRIMITIVE_INPUT(int64);
> +  //TEST_PRIMITIVE_INPUT(uint64);
>    TEST_PRIMITIVE_INPUT(float);
>    TEST_PRIMITIVE_INPUT(double);
>    TEST_PRIMITIVE_INPUT(string);
> @@ -148,6 +149,7 @@
>      binaryBuffer[i] = i;
>  
>    outputEngine.writeBinary((const uint8*) binaryBuffer, sizeof(binaryBuffer));
> +  outputEngine.sync(); // flush Engine buffers before closing file
>    outputArchive.close();
>  
>    // read binary data back in and check
> @@ -180,6 +182,7 @@
>  
>    outputEngine << intVector;
>    outputEngine << *pIntVector;
> +  outputEngine.sync(); // flush Engine buffers before closing file
>    outputArchive.close();
>  
>    // read STL std::vector back in and check
> @@ -218,6 +221,7 @@
>  
>    outputEngine << intDeque;
>    outputEngine << *pIntDeque;
> +  outputEngine.sync(); // flush Engine buffers before closing file
>    outputArchive.close();
>  
>    // read STL std::deque back in and check
> @@ -256,6 +260,7 @@
>  
>    outputEngine << intMap;
>    outputEngine << *pIntMap;
> +  outputEngine.sync(); // flush Engine buffers before closing file
>    outputArchive.close();
>  
>    // read STL std::map back in and check
> @@ -282,6 +287,7 @@
>    std::fstream outputArchive("EngineComplexObjectTest.dat", std::ios::out|std::ios::binary);
>    Engine outputEngine(outputArchive, ost::Engine::modeWrite);
>    outputEngine << complexObject;
> +  outputEngine.sync(); // flush Engine buffers before closing file
>    outputArchive.close();
>  
>    // Unpersist a new object structure into an uninitialized object
> @@ -321,6 +327,7 @@
>      std::fstream inputArchive("EngineComplexObjectTest.dat", std::ios::in);
>      Engine inputEngine(inputArchive, ost::Engine::modeRead);
>      inputEngine >> myObjAllocatedPtr;
> +    outputEngine.sync(); // flush Engine buffers before closing file
>      inputArchive.close();
>  
>      CPPUNIT_ASSERT_MESSAGE("Unpersisted into pre-allocated pointer", *myObjAllocatedPtr == complexObject);
> Index: tests/Test_Engine.h
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_Engine.h,v
> retrieving revision 1.1.6.1
> diff -u -r1.1.6.1 Test_Engine.h
> --- tests/Test_Engine.h	17 Jan 2004 11:51:02 -0000	1.1.6.1
> +++ tests/Test_Engine.h	17 Jul 2004 04:50:45 -0000
> @@ -141,4 +141,3 @@
>     */
>    void testModeExceptions();
>  };
> -
> Index: tests/Test_TCPStream.h
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_TCPStream.h,v
> retrieving revision 1.1.6.1
> diff -u -r1.1.6.1 Test_TCPStream.h
> --- tests/Test_TCPStream.h	17 Jan 2004 11:51:02 -0000	1.1.6.1
> +++ tests/Test_TCPStream.h	17 Jul 2004 04:50:45 -0000
> @@ -68,22 +68,23 @@
>  
>    void testIsPending()
>    {
> +    /* FIXME hanging after recent changes to isPending?
>      try
> -	    {
> -		    // Just connect to a port that won't send data -- doesn't matter what
> -		    ost::TCPStream foo("10.0.0.5",5800,512,true,100);
> -		    for(unsigned int i = 0; i < 50 ; i++)
> -		    {
> -			    while( foo.isPending(ost::Socket::pendingInput,100));
> -		    }
> -
> -        CPPUNIT_ASSERT(true);
> -	    }
> -	    catch( ost::Socket* s )
> -	    {
> -        CPPUNIT_ASSERT_MESSAGE("Socket error", true);
> -	    }
> +    {
> +      // Just connect to a port that won't send data -- doesn't matter what
> +      ost::TCPStream foo(ost::IPV4Host("10.0.0.5"),5800,512,true,100);
> +      for(unsigned int i = 0; i < 5 ; i++)
> +      {
> +        while( foo.isPending(ost::Socket::pendingInput,100));
> +      }
> +    
> +      CPPUNIT_ASSERT(true);
> +    }
> +    catch( ost::Socket* s )
> +    {
> +      CPPUNIT_ASSERT_MESSAGE("Socket error", true);
> +    }
> +    */
>    }
>    
> -};
> -
> +};
> Index: tests/Test_URLString.h
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/tests/Test_URLString.h,v
> retrieving revision 1.3.4.1
> diff -u -r1.3.4.1 Test_URLString.h
> --- tests/Test_URLString.h	17 Jan 2004 11:51:02 -0000	1.3.4.1
> +++ tests/Test_URLString.h	17 Jul 2004 04:50:45 -0000
> @@ -40,7 +40,7 @@
>  
>  #include <cppunit/extensions/HelperMacros.h>
>  #include <iostream>
> -#include <cc++/urlstring.h>
> +#include <cc++/url.h>
>  
>  using namespace ost;
>  using std::string;
> @@ -112,8 +112,8 @@
>  
>    void testStringVersion()
>    {
> -    CPPUNIT_ASSERT_EQUAL(string("VGhpcyBpcyBhIHRlc3Qu"), b64Encode(string("This is a test.")));
> -    CPPUNIT_ASSERT_EQUAL(string("This is a test."), b64Decode(string("VGhpcyBpcyBhIHRlc3Qu")));
> +    CPPUNIT_ASSERT_EQUAL(String("VGhpcyBpcyBhIHRlc3Qu"), b64Encode(String("This is a test.")));
> +    CPPUNIT_ASSERT_EQUAL(String("This is a test."), b64Decode(String("VGhpcyBpcyBhIHRlc3Qu")));
>    }
>  
>    void testTypicalTextBase64EncodeDecode()
> Index: include/cc++/persist.h
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/include/cc++/persist.h,v
> retrieving revision 1.11.4.7
> diff -u -r1.11.4.7 persist.h
> --- include/cc++/persist.h	14 Jun 2004 21:48:23 -0000	1.11.4.7
> +++ include/cc++/persist.h	17 Jul 2004 04:50:45 -0000
> @@ -46,6 +46,14 @@
>  #ifndef	CCXX_PERSIST_H_
>  #define	CCXX_PERSIST_H_
>  
> +#ifndef CCXX_CONFIG_H_
> +#include <cc++/config.h>
> +#endif
> +
> +#ifndef CCXX_EXCEPTIONS_H_
> +#include <cc++/exception.h>
> +#endif
> +
>  #ifndef CCXX_MISSING_H_
>  #include <cc++/missing.h>
>  #endif
> @@ -280,6 +288,8 @@
>  	 * This Flushes the buffers and closes the Persistence::Engine
>  	 * this must happen before the underlying stream is shut down
>  	 */
> +  void sync();
> +  
>  	virtual ~Engine();
>  
>  
> @@ -312,7 +322,9 @@
>  	void write(float i)  THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
>  	void write(double i) THROWS (Exception) { CCXX_ENGINEWRITE_REF(i); }
>  #undef CCXX_ENGINEWRITE_REF
> +
>  	void write(const String& str) THROWS (Exception);
> +	void write(const std::string& str) THROWS (Exception);
>  
>  	// Every write operation boils down to one or more of these
>  	void writeBinary(const uint8* data, const uint32 size) THROWS (Exception);
> @@ -348,6 +360,7 @@
>  #undef CCXX_ENGINEREAD_REF
>  
>  	void read(String& str) THROWS (Exception);
> +	void read(std::string& str) THROWS (Exception);
>  
>  	// Every read operation boild down to one or more of these
>  	void readBinary(uint8* data, uint32 size) THROWS (Exception);
> @@ -465,6 +478,11 @@
>  __EXPORT Engine& operator <<( Engine& ar, String ob)  THROWS (Engine::Exception);
>  
>  /** @relates Engine */
> +__EXPORT Engine& operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception);
> +/** @relates Engine */
> +__EXPORT Engine& operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception);
> +
> +/** @relates Engine */
>  __EXPORT Engine& operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception);
>  /** @relates Engine */
>  __EXPORT Engine& operator <<( Engine& ar, bool ob)  THROWS (Engine::Exception);
> @@ -585,7 +603,3 @@
>   * c-basic-offset: 8
>   * End:
>   */
> -
> -
> -
> -
> Index: src/engine.cpp
> ===================================================================
> RCS file: /cvsroot/commoncpp/commoncpp2/src/engine.cpp,v
> retrieving revision 1.6.4.4
> diff -u -r1.6.4.4 engine.cpp
> --- src/engine.cpp	6 Jul 2004 21:55:05 -0000	1.6.4.4
> +++ src/engine.cpp	17 Jul 2004 04:50:45 -0000
> @@ -109,8 +109,7 @@
>  #endif
>  }
>  
> -
> -Engine::~Engine()
> +void Engine::sync()
>  {
>    // Flush compression buffers etc here.
>  #ifndef NO_COMPRESSION
> @@ -133,11 +132,17 @@
>  		}
>  	  deflateEnd(&myZStream);
>  	}
> -  delete [] myCompressedDataBuffer;
> -  delete [] myUncompressedDataBuffer;
>  #endif
>  }
>  
> +Engine::~Engine()
> +{
> +  if (myUnderlyingStream.good())
> +    sync();
> +
> +  delete [] myCompressedDataBuffer;
> +  delete [] myUncompressedDataBuffer;
> +}
>  
>  void Engine::writeBinary(const uint8* data, const uint32 size) 
>  	THROWS (Engine::Exception)
> @@ -268,7 +273,7 @@
>  		  uint32 classId = (uint32)myClassMap.size();
>  		  myClassMap[object->getPersistenceID()] = classId;
>  		  write(classId);
> -		  write(object->getPersistenceID());
> +		  write(static_cast<String>(object->getPersistenceID()));
>  		}
>  	  else
>  		{
> @@ -309,7 +314,7 @@
>    // we won't need it later since this object is already allocated
>    readClass();
>    
> -	// Okay then - we can read data straight into this object
> +  // Okay then - we can read data straight into this object
>    readObject(&object);
>  }
>  
> @@ -419,6 +424,30 @@
>    delete[] buffer;
>  }
>  
> +/*
> + * note, does not (yet?) throw an exception, but interface
> + * prepared ..
> + */
> +void Engine::write(const std::string& str) THROWS (Engine::Exception)
> +{
> +  assert(myOperationalMode == modeWrite);
> +  uint32 len = (uint32)str.length();
> +  write(len);
> +  writeBinary((uint8*)str.c_str(),len);
> +}
> +
> +void Engine::read(std::string& str) THROWS (Engine::Exception)
> +{
> +  assert(myOperationalMode == modeRead);
> +  uint32 len = 0;
> +  read(len);
> +  uint8 *buffer = new uint8[len+1];
> +  readBinary(buffer,len);
> +  buffer[len] = 0;
> +  str = (char*)buffer;
> +  delete[] buffer;
> +}
> +
>  #define CCXX_RE(ar,ob)   ar.read(ob); return ar
>  #define CCXX_WE(ar,ob)   ar.write(ob); return ar
>  
> @@ -462,6 +491,9 @@
>  CCXX_EXPORT(Engine&) operator >>( Engine& ar, String& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
>  CCXX_EXPORT(Engine&) operator <<( Engine& ar, String ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
>  
> +CCXX_EXPORT(Engine&) operator >>( Engine& ar, std::string& ob) THROWS (Engine::Exception) {CCXX_RE (ar,ob);}
> +CCXX_EXPORT(Engine&) operator <<( Engine& ar, std::string ob)  THROWS (Engine::Exception) {CCXX_WE (ar,ob);}
> +
>  CCXX_EXPORT(Engine&) operator >>( Engine& ar, bool& ob) THROWS (Engine::Exception) {
>  	uint32 a; ar.read(a); ob=a==1;return ar;
>  }

> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Sat Jul 17 09:08:28 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BlovU-0004g1-0P
	for mharc-bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:08:28 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BlovS-0004fw-86
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:08:26 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BlovR-0004fk-Ir
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:08:26 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BlovR-0004fh-CP
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:08:25 -0400
Received: from [68.239.159.99] (helo=mail.sys)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlosN-0002wK-I1
	for bug-commoncpp@gnu.org; Sat, 17 Jul 2004 09:05:16 -0400
Received: by mail.sys (Postfix, from userid 501)
	id 3EC6A2A7F2; Sat, 17 Jul 2004 09:05:15 -0400 (EDT)
Date: Sat, 17 Jul 2004 09:05:15 -0400
From: David Sugar <dyfet@ostel.com>
To: Chad Yates <cyates@uidaho.edu>
Message-ID: <20040717130515.GB32673@ostel.com>
References: <40F8BBCC.8000406@uidaho.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <40F8BBCC.8000406@uidaho.edu>
User-Agent: Mutt/1.5.5.1i
Cc: bug-commoncpp@gnu.org
Subject: Re: Patch to convert assert statements in Engine to exceptions when
	available
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 17 Jul 2004 13:08:26 -0000

The engine code was all done by Daniel originally.  So it has a
different style than the rest.  I think, in theory, for consistency,
engine should be changed to use tabs.  In any case, I was able to apply
this patch successfully.  I like the idea of expanding THROW to post
error messages on systems without exceptions, and I will look at that
for 1.3.  Perhaps it should invoke slog to log error strings rather 
than cerr?  Since they "abort", they probably should be logged as 
CRIT level...

Chad Yates wrote:

> Attached is a patch.
> 
>  - removed unnecessary Engine mode asserts statements
>  - converted assert statements in readBinary/writeBinary to exceptions 
> using the THROW macro. these should be the only necessary checkpoints as 
> all reads end in calls to these to do the actual i/o.
>  - ran expand -t 2 on it to clean up inconsistent tab vs 2 space 
> indentation.  what is the standard anyway? tabs or spaces?
> 
> It would be nice to change the THROW macro to output the string in the 
> case of a system with no exceptions:
> 
> from:
>  #define THROW(x) abort()
> to:
>  #define THROW(x) std::cerr << x << std::endl; abort();
> 
> But I don't know if that would negatively affect any "non-string" calls, 
> assuming there are any.
> 
> ,Chad

> 45c45
> < #if	!defined(_MSC_VER) || _MSC_VER >= 1300
> ---
> > #if !defined(_MSC_VER) || _MSC_VER >= 1300
> 48a49
> > #ifndef HAVE_EXCEPTION
> 49a51
> > #endif
> 51c53
> < #ifdef	CCXX_NAMESPACES
> ---
> > #ifdef  CCXX_NAMESPACES
> 60c62
> < #ifdef	CCXX_EXCEPTIONS
> ---
> > #ifdef  CCXX_EXCEPTIONS
> 62c64
> < 	PersistException(reason) 
> ---
> >   PersistException(reason) 
> 77c79
> < 	: myUnderlyingStream(stream), myOperationalMode(mode)
> ---
> >   : myUnderlyingStream(stream), myOperationalMode(mode)
> 88,97c90,99
> < 	{
> < 	  myZStream.next_in = myCompressedDataBuffer;
> < 	  myZStream.next_out = myUncompressedDataBuffer;
> < 	  myZStream.avail_in = 0;
> < 	  myZStream.avail_out = MAX_BUFFER;
> < 	  int err = inflateInit(&myZStream);
> < 	  if (err != Z_OK) {
> < 		  THROW (PersistException(String("zLib didn't initialise for inflating.")));
> < 	  }
> < 	}
> ---
> >   {
> >     myZStream.next_in = myCompressedDataBuffer;
> >     myZStream.next_out = myUncompressedDataBuffer;
> >     myZStream.avail_in = 0;
> >     myZStream.avail_out = MAX_BUFFER;
> >     int err = inflateInit(&myZStream);
> >     if (err != Z_OK) {
> >       THROW (PersistException(String("zLib didn't initialise for inflating.")));
> >     }
> >   }
> 99,108c101,110
> < 	{
> < 	  myZStream.next_in = myUncompressedDataBuffer;
> < 	  myZStream.next_out = myCompressedDataBuffer;
> < 	  myZStream.avail_in = 0;
> < 	  myZStream.avail_out = MAX_BUFFER;
> < 	  int err = deflateInit(&myZStream,9); // TODO: tweak compression level
> < 	  if (err != Z_OK) {
> < 		  THROW ( PersistException(String("zLib didn't initialise for deflating.")));
> < 	  }
> < 	}
> ---
> >   {
> >     myZStream.next_in = myUncompressedDataBuffer;
> >     myZStream.next_out = myCompressedDataBuffer;
> >     myZStream.avail_in = 0;
> >     myZStream.avail_out = MAX_BUFFER;
> >     int err = deflateInit(&myZStream,9); // TODO: tweak compression level
> >     if (err != Z_OK) {
> >       THROW ( PersistException(String("zLib didn't initialise for deflating.")));
> >     }
> >   }
> 117,119c119,121
> < 	{
> < 	  inflateEnd(&myZStream);
> < 	}
> ---
> >   {
> >     inflateEnd(&myZStream);
> >   }
> 121,134c123,136
> < 	{
> < 	  int zret = Z_OK;
> < 	  while (myZStream.avail_in > 0 || zret == Z_OK)
> < 		{
> < 		  zret = deflate(&myZStream,Z_FINISH);
> < 		  if (myZStream.avail_out >= 0)
> < 			{
> < 			  myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER - myZStream.avail_out);
> < 			  myZStream.next_out = myCompressedDataBuffer;
> < 			  myZStream.avail_out = MAX_BUFFER;
> < 			}
> < 		}
> < 	  deflateEnd(&myZStream);
> < 	}
> ---
> >   {
> >     int zret = Z_OK;
> >     while (myZStream.avail_in > 0 || zret == Z_OK)
> >     {
> >       zret = deflate(&myZStream,Z_FINISH);
> >       if (myZStream.avail_out >= 0)
> >       {
> >         myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER - myZStream.avail_out);
> >         myZStream.next_out = myCompressedDataBuffer;
> >         myZStream.avail_out = MAX_BUFFER;
> >       }
> >     }
> >     deflateEnd(&myZStream);
> >   }
> 148c150
> < 	THROWS (Engine::Exception)
> ---
> >   THROWS (Engine::Exception)
> 150c152,153
> <   assert(myOperationalMode == modeWrite);
> ---
> >   if(myOperationalMode != modeWrite)
> >     THROW("Cannot write to an input Engine");
> 157,186c160,189
> < 	{
> < 	  // transfer as much information as we can into the input buffer.
> < 	  if (myZStream.avail_in < MAX_BUFFER)
> < 		{
> < 		  uint32 toAdd = size - written;
> < 		  if (toAdd > (MAX_BUFFER - myZStream.avail_in))
> < 			toAdd = (MAX_BUFFER - myZStream.avail_in);
> < 		  memcpy(myZStream.next_in + myZStream.avail_in, data+written,toAdd);
> < 		  written += toAdd;
> < 		  myZStream.avail_in += toAdd;
> < 		}
> < 	  if (myZStream.avail_in < MAX_BUFFER)
> < 		return; // We have not filled the buffer, so let's carry on streaming
> < 	  // We have a full input buffer, so we compressit.
> < 	  while (myZStream.avail_in > 0)
> < 		{
> < 		  deflate(&myZStream,0);
> < 		  if (myZStream.avail_out == 0)
> < 			{
> < 			  // We filled the output buffer, let's stream it
> < 			  myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER);
> < 			  myZStream.next_out = myCompressedDataBuffer;
> < 			  myZStream.avail_out = MAX_BUFFER;
> < 			}
> < 		  // Repeat whilst the input buffer isn't flushed
> < 		}
> < 	  // Now we have flushed the input buffer we can reset it
> < 	  myZStream.avail_in = 0;
> < 	  myZStream.next_in = myUncompressedDataBuffer;
> < 	}
> ---
> >   {
> >     // transfer as much information as we can into the input buffer.
> >     if (myZStream.avail_in < MAX_BUFFER)
> >     {
> >       uint32 toAdd = size - written;
> >       if (toAdd > (MAX_BUFFER - myZStream.avail_in))
> >       toAdd = (MAX_BUFFER - myZStream.avail_in);
> >       memcpy(myZStream.next_in + myZStream.avail_in, data+written,toAdd);
> >       written += toAdd;
> >       myZStream.avail_in += toAdd;
> >     }
> >     if (myZStream.avail_in < MAX_BUFFER)
> >     return; // We have not filled the buffer, so let's carry on streaming
> >     // We have a full input buffer, so we compressit.
> >     while (myZStream.avail_in > 0)
> >     {
> >       deflate(&myZStream,0);
> >       if (myZStream.avail_out == 0)
> >       {
> >         // We filled the output buffer, let's stream it
> >         myUnderlyingStream.write((char*)myCompressedDataBuffer,MAX_BUFFER);
> >         myZStream.next_out = myCompressedDataBuffer;
> >         myZStream.avail_out = MAX_BUFFER;
> >       }
> >       // Repeat whilst the input buffer isn't flushed
> >     }
> >     // Now we have flushed the input buffer we can reset it
> >     myZStream.avail_in = 0;
> >     myZStream.next_in = myUncompressedDataBuffer;
> >   }
> 192c195,196
> <   assert(myOperationalMode == modeRead);
> ---
> >   if(myOperationalMode != modeRead)
> >     THROW("Cannot read from an output Engine");
> 198,240c202,244
> < 	{
> < 	  // If we have any data left in the uncompressed buffer - use it
> < 	  if (myLastUncompressedDataRead < myZStream.next_out)
> < 		{
> < 		  uint32 toRead = size - read;
> < 		  if (toRead > (uint32)(myZStream.next_out - myLastUncompressedDataRead))
> < 			toRead = (myZStream.next_out - myLastUncompressedDataRead);
> < 		  memcpy(data+read,myLastUncompressedDataRead,toRead);
> < 		  myLastUncompressedDataRead += toRead;
> < 		  read += toRead;
> < 		}
> < 	  if (read == size)
> < 		return; // We have read all we need to
> < 	  // Reset the stream for the next block of data
> < 	  myLastUncompressedDataRead = myUncompressedDataBuffer;
> < 	  myZStream.next_out = myUncompressedDataBuffer;
> < 	  myZStream.avail_out = MAX_BUFFER;
> < 	  // Next we have to deal such that, until we have a full output buffer,
> < 	  // (Or we run out of input)
> < 	  if (myUnderlyingStream.good())
> < 		{
> < 		  while (myUnderlyingStream.good() && myZStream.avail_out > 0)
> < 			{
> < 			  // Right then, if we have run out of input, fetch another chunk
> < 			  if (myZStream.avail_in == 0)
> < 				{
> < 				  myZStream.next_in = myCompressedDataBuffer;
> < 				  myUnderlyingStream.read((char*)myCompressedDataBuffer,MAX_BUFFER);
> < 				  myZStream.avail_in = myUnderlyingStream.gcount();
> < 				}
> < 			  inflate(&myZStream,0);
> < 			}
> < 		}
> < 	  else
> < 		{
> < 		  // Oh dear - we ran out of input on the buffer.
> < 		  // Maybe we can still inflate some
> < 		  inflate(&myZStream,0);
> < 		  if (myZStream.avail_out == MAX_BUFFER)
> < //			  THROW (PersistException(String("Oh dear - ran out of input")));
> < 			  THROW (Exception(String("Oh dear - ran out of input")));
> < 		}
> < 	}
> ---
> >   {
> >     // If we have any data left in the uncompressed buffer - use it
> >     if (myLastUncompressedDataRead < myZStream.next_out)
> >     {
> >       uint32 toRead = size - read;
> >       if (toRead > (uint32)(myZStream.next_out - myLastUncompressedDataRead))
> >       toRead = (myZStream.next_out - myLastUncompressedDataRead);
> >       memcpy(data+read,myLastUncompressedDataRead,toRead);
> >       myLastUncompressedDataRead += toRead;
> >       read += toRead;
> >     }
> >     if (read == size)
> >     return; // We have read all we need to
> >     // Reset the stream for the next block of data
> >     myLastUncompressedDataRead = myUncompressedDataBuffer;
> >     myZStream.next_out = myUncompressedDataBuffer;
> >     myZStream.avail_out = MAX_BUFFER;
> >     // Next we have to deal such that, until we have a full output buffer,
> >     // (Or we run out of input)
> >     if (myUnderlyingStream.good())
> >     {
> >       while (myUnderlyingStream.good() && myZStream.avail_out > 0)
> >       {
> >         // Right then, if we have run out of input, fetch another chunk
> >         if (myZStream.avail_in == 0)
> >         {
> >           myZStream.next_in = myCompressedDataBuffer;
> >           myUnderlyingStream.read((char*)myCompressedDataBuffer,MAX_BUFFER);
> >           myZStream.avail_in = myUnderlyingStream.gcount();
> >         }
> >         inflate(&myZStream,0);
> >       }
> >     }
> >     else
> >     {
> >       // Oh dear - we ran out of input on the buffer.
> >       // Maybe we can still inflate some
> >       inflate(&myZStream,0);
> >       if (myZStream.avail_out == MAX_BUFFER)
> > //        THROW (PersistException(String("Oh dear - ran out of input")));
> >         THROW (Exception(String("Oh dear - ran out of input")));
> >     }
> >   }
> 250,251d253
> <   assert(myOperationalMode == modeWrite);
> < 
> 256,260c258,262
> < 	{
> < 	  uint32 id = NullObject;
> < 	  write(id);
> < 	  return;
> < 	}
> ---
> >   {
> >     uint32 id = NullObject;
> >     write(id);
> >     return;
> >   }
> 265,288c267,290
> < 	{
> < 	  // Unfortunately we need to serialise it - here we go ....
> < 	  uint32 id = (uint32)myArchiveMap.size();
> < 	  myArchiveMap[object] = id; // bumps id automatically for next one
> < 	  write(id);
> < 	  ClassMap::const_iterator classItor = myClassMap.find(object->getPersistenceID());
> < 	  if (classItor == myClassMap.end())
> < 		{
> < 		  uint32 classId = (uint32)myClassMap.size();
> < 		  myClassMap[object->getPersistenceID()] = classId;
> < 		  write(classId);
> < 		  write(static_cast<String>(object->getPersistenceID()));
> < 		}
> < 	  else
> < 		{
> < 		  write(classItor->second);
> < 		}
> < 	  String majik;
> < 	  majik = "OBST";
> < 	  write(majik);
> < 	  object->write(*this);
> < 	  majik = "OBEN";
> < 	  write(majik);
> < 	}
> ---
> >   {
> >     // Unfortunately we need to serialise it - here we go ....
> >     uint32 id = (uint32)myArchiveMap.size();
> >     myArchiveMap[object] = id; // bumps id automatically for next one
> >     write(id);
> >     ClassMap::const_iterator classItor = myClassMap.find(object->getPersistenceID());
> >     if (classItor == myClassMap.end())
> >     {
> >       uint32 classId = (uint32)myClassMap.size();
> >       myClassMap[object->getPersistenceID()] = classId;
> >       write(classId);
> >       write(static_cast<String>(object->getPersistenceID()));
> >     }
> >     else
> >     {
> >       write(classItor->second);
> >     }
> >     String majik;
> >     majik = "OBST";
> >     write(majik);
> >     object->write(*this);
> >     majik = "OBEN";
> >     write(majik);
> >   }
> 290,293c292,295
> < 	{
> < 	  // This object has been serialised, so just pop its ID out
> < 	  write(itor->second);
> < 	}
> ---
> >   {
> >     // This object has been serialised, so just pop its ID out
> >     write(itor->second);
> >   }
> 301d302
> <   assert(myOperationalMode == modeRead);
> 304c305,306
> <   assert(id != NullObject); // id should never be null for a reference
> ---
> >   if (id == NullObject)
> >     THROW("Object Id should not be NULL when unpersisting to a reference");
> 308,311c310,313
> < 	{
> < 	  object = *(myArchiveVector[id]);
> < 	  return;
> < 	}
> ---
> >   {
> >     object = *(myArchiveVector[id]);
> >     return;
> >   }
> 326d327
> <   assert(myOperationalMode == modeRead);
> 331,334c332,335
> < 	{
> < 	  object = NULL;
> < 	  return;
> < 	}
> ---
> >   {
> >     object = NULL;
> >     return;
> >   }
> 338,341c339,342
> < 	{
> < 	  object = myArchiveVector[id];
> < 	  return;
> < 	}
> ---
> >   {
> >     object = myArchiveVector[id];
> >     return;
> >   }
> 356,357c357,358
> < 	{
> < 	  // Okay then - we can make this object
> ---
> >   {
> >     // Okay then - we can make this object
> 359c360
> < 	}
> ---
> >   }
> 361c362
> < 	  THROW (Exception((String("Unable to instantiate object of class ")+className).c_str()));
> ---
> >     THROW (Exception(String("Unable to instantiate object of class ")+className));
> 369,376c370,379
> < 	// Okay then - we can make this object
> < 	myArchiveVector.push_back(object);
> < 	String majik;
> < 	read(majik);
> < 	assert(majik == String("OBST"));
> < 	object->read(*this);
> < 	read(majik);
> < 	assert(majik == String("OBEN"));
> ---
> >   // Okay then - we can make this object
> >   myArchiveVector.push_back(object);
> >   String majik;
> >   read(majik);
> >   if(majik != String("OBST"))
> >     THROW("Missing Start-of-Object marker");
> >   object->read(*this);
> >   read(majik);
> >   if(majik != String("OBEN"))
> >     THROW("Missing End-of-Object marker");
> 389,391c392,394
> < 	{
> < 	  className = myClassVector[classId];
> < 	}
> ---
> >   {
> >     className = myClassVector[classId];
> >   }
> 393,397c396,400
> < 	{
> < 	  // Okay the class wasn't known yet - save its name
> < 	  read(className);
> < 	  myClassVector.push_back(className);
> < 	}
> ---
> >   {
> >     // Okay the class wasn't known yet - save its name
> >     read(className);
> >     myClassVector.push_back(className);
> >   }
> 409d411
> <   assert(myOperationalMode == modeWrite);
> 417d418
> <   assert(myOperationalMode == modeRead);
> 433d433
> <   assert(myOperationalMode == modeWrite);
> 441d440
> <   assert(myOperationalMode == modeRead);
> 477c476
> < #ifdef	HAVE_64_BITS
> ---
> > #ifdef  HAVE_64_BITS
> 498c497
> < 	uint32 a; ar.read(a); ob=a==1;return ar;
> ---
> >   uint32 a; ar.read(a); ob=a==1;return ar;
> 501c500
> < 	uint32 a=ob?1:0; ar.write(a); return ar;
> ---
> >   uint32 a=ob?1:0; ar.write(a); return ar;
> 507c506
> < #ifdef	CCXX_NAMESPACES
> ---
> > #ifdef  CCXX_NAMESPACES

> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Thu Jul 29 09:44:27 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BqBCt-0003Kn-Fe
	for mharc-bug-commoncpp@gnu.org; Thu, 29 Jul 2004 09:44:27 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BpvO5-0008O1-O3
	for bug-commoncpp@gnu.org; Wed, 28 Jul 2004 16:50:57 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BpvO4-0008N1-2q
	for bug-commoncpp@gnu.org; Wed, 28 Jul 2004 16:50:57 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BpvO3-0008Ms-U2
	for bug-commoncpp@gnu.org; Wed, 28 Jul 2004 16:50:56 -0400
Received: from [64.186.168.130] (helo=fw.sigmadesigns.com)
	by monty-python.gnu.org with smtp (Exim 4.34) id 1BpvKi-0006UW-DN
	for bug-commoncpp@gnu.org; Wed, 28 Jul 2004 16:47:28 -0400
Received: (qmail 10520 invoked by uid 204); 28 Jul 2004 20:41:25 -0000
Received: from Michael_Uman@sdesigns.com by fw by uid 201 with
	qmail-scanner-1.20rc1 (spamassassin: 2.55.  Clear:RC:1:. 
	Processed in 0.145821 secs); 28 Jul 2004 20:41:25 -0000
Received: from muman-pc.asic.sdesigns.com (172.30.63.136)
	by wks1.stratum8.com with SMTP; 28 Jul 2004 20:41:24 -0000
From: Michael Uman <Michael_Uman@sdesigns.com>
To: bug-commoncpp@gnu.org
Content-Type: multipart/mixed; boundary="=-4wnzwbdREBq8P4OiNhpo"
Message-Id: <1091047718.4537.17.camel@muman-pc>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.6 
Date: Wed, 28 Jul 2004 13:48:39 -0700
X-Mailman-Approved-At: Thu, 29 Jul 2004 09:44:25 -0400
Subject: Think there is a problem in ost::Socket::setCompletion
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Jul 2004 20:50:58 -0000


--=-4wnzwbdREBq8P4OiNhpo
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hello,

I think I just fixed a bug in Socket::setCompletion.

Here is what has happened... I have an application which uses wxWindows
and CommonCpp. It works fine on both Windows and Linux when run
natively. But I decided to try to run the Windows executable using the
WINE emulator. Now the Wine debugger complained about a problem. I built
everything for debug, and used the .pdb's generated. Now when wine hit
the problem , the stack trace indicated it was in the ioctlsocket
function, called from setCompletion. I looked into the source code and
noticed that the call doesn't conform to the Windows Platform SDK
description of the function. According to the docs the prototype of
ioctlsocket is:

int ioctlsocket(
  SOCKET s,
  long cmd,
  u_long* argp
);

This indicates that the 3rd argument is a pointer to an u_long {unsigned
long int}. It appears in the socket.cpp module that the integer 0 or 1
is passed in the argument. The SDK describes the FIONBIO ioctl using the
following language:

FIONBIO 
>>The argp parameter is a pointer to an unsigned long value<<. Set argp
to a nonzero value if the nonblocking mode should be enabled, or zero if
the nonblocking mode should be disabled. When a socket is created, it
operates in blocking mode by default (nonblocking mode is disabled). 

This is consistent with BSD sockets. argp value Nonblocking mode 
0 Disabled 
nonzero Enabled 

I modified the source and rebuilt the ccgnu2.dll {actually the
ccgnu2d.dll} and retried my tests. Now everything works well. I am still
having another problem concerning commoncpp ost::Socket::error when it
comes to throwing an exception. But this error only occurs when my app
is unable to attach to the server {workable but still not acceptable}.

My patch is attached to this email... basically just pass the ulong
which is set according to the immediate flag {you'll see...}...

I hope this is helpful. Also, thank you for maintaining such a useful
cross-platform function library... ;)

Thank you,
Michael A. Uman
Sr. Software Engineer, System tools
Sigma Designs



--=-4wnzwbdREBq8P4OiNhpo
Content-Disposition: attachment; filename=socket_patch.diff
Content-Type: text/plain; name=socket_patch.diff; charset=UTF-8
Content-Transfer-Encoding: 7bit

--- socket.cpp	2003-06-06 16:16:46.000000000 -0700
+++ /users/muman/socket.cpp	2004-07-28 13:43:47.000000000 -0700
@@ -687,17 +687,12 @@
 	flags.completion = immediate;
 #ifdef WIN32
 	// note that this will not work on some versions of Windows for Workgroups. Tough. -- jfc
-	switch( immediate )
-	{
-	case false:
-		// this will not work if you are using WSAAsyncSelect or WSAEventSelect.
-		// -- perhaps I should throw an exception
-		ioctlsocket( so, FIONBIO, (unsigned long *) 1);
-		break;
-	case true:
-		ioctlsocket( so, FIONBIO, (unsigned long *) 0);
-		break;
-	}
+
+	u_long	argp;
+
+	argp = (immediate == false)?1:0;
+	ioctlsocket( so, FIONBIO, (unsigned long *) &argp);
+
 #else
 	int fflags = fcntl(so, F_GETFL);
 

--=-4wnzwbdREBq8P4OiNhpo--




From MAILER-DAEMON Thu Jul 29 09:44:27 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BqBCt-0003Kt-Mt
	for mharc-bug-commoncpp@gnu.org; Thu, 29 Jul 2004 09:44:27 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Bq9tV-0001NY-JD
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 08:20:21 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Bq9tU-0001M6-9P
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 08:20:21 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Bq9tT-0001LD-Vc
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 08:20:20 -0400
Received: from [193.10.250.34] (helo=mail1.mh.se)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bq9q3-00065o-S1
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 08:16:48 -0400
Received: from sudden.mh.se (sudden.mh.se [10.3.1.17])
	by mail1.mh.se (8.12.10/8.12.10) with ESMTP id i6TCGiHV025048
	for <bug-commoncpp@gnu.org>; Thu, 29 Jul 2004 14:16:44 +0200 (MEST)
Received: from Gargamel.forv.mh.se (unverified [10.10.1.7]) by sudden.mh.se
	(Content Technologies SMTPRS 4.3.14) with ESMTP id
	<T6b17ab559d0a030111630@sudden.mh.se> for <bug-commoncpp@gnu.org>; 
	Thu, 29 Jul 2004 14:16:45 +0200
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Date: Thu, 29 Jul 2004 14:16:45 +0200
Message-ID: <BF157510F9DD6B4383E96B31C9ACF6F202128C4F@gargamel.personal.mh.se>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: unfriendly makefile vs. sensitive Linux => KO
Thread-Index: AcR1ZenWN3fusjT2SMKsgnaJXn/Zbg==
From: =?iso-8859-1?Q?Lindstr=F6m_Stefan?= <Stefan.Lindstrom@mh.se>
To: <bug-commoncpp@gnu.org>
X-Mailman-Approved-At: Thu, 29 Jul 2004 09:44:25 -0400
Subject: unfriendly makefile vs. sensitive Linux => KO
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Jul 2004 12:20:21 -0000

Hi,

I installed commoncpp on my Mandrake Linux system. When running make =
install the ld.so.conf file was changed automatically to include =
/usr/local/lib. This was unfortunate since Linux wouldn't start after =
that. Removing /usr/local/lib from ld.so.conf and running ldconfig =
solved the problem, of course. I then set the LD_LIBRARY_PATH =
environment variable to include /usr/local/lib as usual and everything =
worked fine.

I've not changed any startup config or anything in my Linux, so it must =
be that Mandrake Linux does not tolerate /usr/local/lib to be included =
at startup. Since there is at least one system not supporting your =
Makefile I suggest you change it so that ld.so.conf is not automatically =
changed.

/Yours,

Stefan Lindstr=F6m




From MAILER-DAEMON Thu Jul 29 10:06:54 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BqBYc-0007wE-AQ
	for mharc-bug-commoncpp@gnu.org; Thu, 29 Jul 2004 10:06:54 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BqBYb-0007vx-J0
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 10:06:53 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BqBYY-0007ur-On
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 10:06:53 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BqBYY-0007uo-FS
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 10:06:50 -0400
Received: from [216.218.222.122] (helo=mail.ostel.com)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BqBUy-0006mS-Ja
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 10:03:08 -0400
Received: from [192.168.1.102] (pcp171447pcs.plsntv01.nj.comcast.net
	[68.46.125.242])
	by mail.ostel.com (Postfix) with ESMTP id EFA7F2F28A7;
	Thu, 29 Jul 2004 07:06:19 -0700 (PDT)
Message-ID: <4109039A.1070202@ostel.com>
Date: Thu, 29 Jul 2004 10:03:06 -0400
From: David Sugar <dyfet@ostel.com>
User-Agent: Mozilla Thunderbird 0.7.1 (Macintosh/20040626)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Michael Uman <Michael_Uman@sdesigns.com>
References: <1091047718.4537.17.camel@muman-pc>
In-Reply-To: <1091047718.4537.17.camel@muman-pc>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: bug-commoncpp@gnu.org
Subject: Re: Think there is a problem in ost::Socket::setCompletion
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Jul 2004 14:06:53 -0000

Looking at 1.2.4, it appears something like this change had already been 
implemented...

Michael Uman wrote:

>Hello,
>
>I think I just fixed a bug in Socket::setCompletion.
>
>Here is what has happened... I have an application which uses wxWindows
>and CommonCpp. It works fine on both Windows and Linux when run
>natively. But I decided to try to run the Windows executable using the
>WINE emulator. Now the Wine debugger complained about a problem. I built
>everything for debug, and used the .pdb's generated. Now when wine hit
>the problem , the stack trace indicated it was in the ioctlsocket
>function, called from setCompletion. I looked into the source code and
>noticed that the call doesn't conform to the Windows Platform SDK
>description of the function. According to the docs the prototype of
>ioctlsocket is:
>
>int ioctlsocket(
>  SOCKET s,
>  long cmd,
>  u_long* argp
>);
>
>This indicates that the 3rd argument is a pointer to an u_long {unsigned
>long int}. It appears in the socket.cpp module that the integer 0 or 1
>is passed in the argument. The SDK describes the FIONBIO ioctl using the
>following language:
>
>FIONBIO 
>  
>
>>>The argp parameter is a pointer to an unsigned long value<<. Set argp
>>>      
>>>
>to a nonzero value if the nonblocking mode should be enabled, or zero if
>the nonblocking mode should be disabled. When a socket is created, it
>operates in blocking mode by default (nonblocking mode is disabled). 
>
>This is consistent with BSD sockets. argp value Nonblocking mode 
>0 Disabled 
>nonzero Enabled 
>
>I modified the source and rebuilt the ccgnu2.dll {actually the
>ccgnu2d.dll} and retried my tests. Now everything works well. I am still
>having another problem concerning commoncpp ost::Socket::error when it
>comes to throwing an exception. But this error only occurs when my app
>is unable to attach to the server {workable but still not acceptable}.
>
>My patch is attached to this email... basically just pass the ulong
>which is set according to the immediate flag {you'll see...}...
>
>I hope this is helpful. Also, thank you for maintaining such a useful
>cross-platform function library... ;)
>
>Thank you,
>Michael A. Uman
>Sr. Software Engineer, System tools
>Sigma Designs
>
>
>  
>
>------------------------------------------------------------------------
>
>--- socket.cpp	2003-06-06 16:16:46.000000000 -0700
>+++ /users/muman/socket.cpp	2004-07-28 13:43:47.000000000 -0700
>@@ -687,17 +687,12 @@
> 	flags.completion = immediate;
> #ifdef WIN32
> 	// note that this will not work on some versions of Windows for Workgroups. Tough. -- jfc
>-	switch( immediate )
>-	{
>-	case false:
>-		// this will not work if you are using WSAAsyncSelect or WSAEventSelect.
>-		// -- perhaps I should throw an exception
>-		ioctlsocket( so, FIONBIO, (unsigned long *) 1);
>-		break;
>-	case true:
>-		ioctlsocket( so, FIONBIO, (unsigned long *) 0);
>-		break;
>-	}
>+
>+	u_long	argp;
>+
>+	argp = (immediate == false)?1:0;
>+	ioctlsocket( so, FIONBIO, (unsigned long *) &argp);
>+
> #else
> 	int fflags = fcntl(so, F_GETFL);
> 
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Bug-commoncpp mailing list
>Bug-commoncpp@gnu.org
>http://lists.gnu.org/mailman/listinfo/bug-commoncpp
>  
>



From MAILER-DAEMON Fri Jul 30 08:33:51 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BqWa7-00057X-Nn
	for mharc-bug-commoncpp@gnu.org; Fri, 30 Jul 2004 08:33:51 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BqO7k-0001OQ-N3
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 23:32:00 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BqO7i-0001Na-OR
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 23:32:00 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BqO7i-0001NX-MS
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 23:31:58 -0400
Received: from [142.161.130.102] (helo=mx-mtaout01.mts.net)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BqO4C-00079L-NE
	for bug-commoncpp@gnu.org; Thu, 29 Jul 2004 23:28:20 -0400
Received: from curtman.magyar ([142.161.35.203]) by mx-mtaout01.mts.net
	with ESMTP
	id <20040730032819.HUVM4492.mx-mtaout01.mts.net@curtman.magyar>
	for <bug-commoncpp@gnu.org>; Thu, 29 Jul 2004 22:28:19 -0500
From: Curtis Magyar <cumagyar@mts.net>
To: bug-commoncpp@gnu.org
Content-Type: text/plain
Date: Thu, 29 Jul 2004 22:29:12 -0500
Message-Id: <1091158152.10054.42.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 1.5.90 
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Fri, 30 Jul 2004 08:33:49 -0400
Subject: Clandestine mailing lists
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 30 Jul 2004 03:32:01 -0000

I finally found the tiny blurb at the bottom of
http://www.gnu.org/software/commoncpp/ that says 

"A mailing list is available on bug-commoncpp@gnu.org. Feel free to send
any bug reports, patches, and questions to this list."

But it doesn't give any hints as to how one might go about subscribing
to it.  The other 3 CommonC++ homepages aren't any more helpful either.

Is there a users-commoncpp list as well?  Thats more like what I'm
after, just some place to ask a (hopefully) simple question.

This mail should be considered an addendum to the bug I filed here:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=9816

--
Curtis Magyar





From MAILER-DAEMON Fri Jul 30 21:32:23 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BqijW-0001nU-WD
	for mharc-bug-commoncpp@gnu.org; Fri, 30 Jul 2004 21:32:23 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BqijV-0001mR-Mq
	for bug-commoncpp@gnu.org; Fri, 30 Jul 2004 21:32:21 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1BqijU-0001mF-43
	for bug-commoncpp@gnu.org; Fri, 30 Jul 2004 21:32:21 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1BqijU-0001mC-1E
	for bug-commoncpp@gnu.org; Fri, 30 Jul 2004 21:32:20 -0400
Received: from [142.161.130.102] (helo=mx-mtaout02.mts.net)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bqifv-0004pA-AQ
	for bug-commoncpp@gnu.org; Fri, 30 Jul 2004 21:28:39 -0400
Received: from curtman.magyar ([142.161.35.203]) by mx-mtaout02.mts.net
	with ESMTP
	id <20040731012838.LSMA1684.mx-mtaout02.mts.net@curtman.magyar>
	for <bug-commoncpp@gnu.org>; Fri, 30 Jul 2004 20:28:38 -0500
From: Curtis Magyar <cumagyar@mts.net>
To: bug-commoncpp@gnu.org
Content-Type: multipart/mixed; boundary="=-irHWqyyWYfp8iPCKeiCA"
Date: Fri, 30 Jul 2004 20:29:32 -0500
Message-Id: <1091237372.8706.20.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 1.5.90 
Subject: BUG: CommonC++ includes compile time $CFLAGS in ccgnu2-config
	--flags
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jul 2004 01:32:21 -0000


--=-irHWqyyWYfp8iPCKeiCA
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

http://bugs.gentoo.org/show_bug.cgi?id=58515

I guess I should report this bug here too.  I filed it with the Gentoo
bugzilla, but the patch should go upstream I think because this
behaviour is very bad.

The problem is that if common c++ is compiled with $CFLAGS set, the
ccgnu2-config script, and the pkg-config stuff in the devel branch both
pass the CommonC++ compile time $CFLAGS on to anything compiled using
those scripts.

There's a patch for 1.0.13 stable branch here:
http://bugs.gentoo.org/attachment.cgi?id=36245&action=view

and I'll attach a patch for 1.2.4 that fixes ccgnu2-config, as well as
the pkg-config files libccgnu2.pc and libccext2.pc.

Hopefully this will save someone else a bunch of time hunting down stray
-march='s in their projects $CFLAGS.

Additionally (and unrelated to this bug), would it not be helpful if
these two pkg-config files were called ccgnu2-1.2.pc and ccext2-1.2.pc
to facilitate having multiple versions of the libraries installed?
And the 'lib' prefix should be implied by the fact you're using the
scripts in the first place.


--
Curtis Magyar


--=-irHWqyyWYfp8iPCKeiCA
Content-Description: Patch to fix commoncpp config scripts
Content-Disposition: inline; filename=commoncpp2-1.2-nocflagsinautotools.patch
Content-Type: text/x-patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

--- commoncpp2-1.2.4-orig/src/ccgnu2-config.in	2004-05-30 10:12:55.000000000 -0500
+++ commoncpp2-1.2.4/src/ccgnu2-config.in	2004-07-27 02:03:36.874432168 -0500
@@ -11,7 +11,7 @@
 
 ost_cv_dynloader="@ost_cv_dynloader@"      
 modflags="@MODULE_FLAGS@"
-ccflags="@THREAD_FLAGS@ @CXXFLAGS@"
+ccflags="@THREAD_FLAGS@"
 cclink="@SOCKET_LIBS@ @GETOPT_LIBS@ @THREAD_LIBS@"
 ccload="@DYN_LOADER@"
 ccstd="@XML_LIBS@ @ZSTREAM_LIBS@"
@@ -84,4 +84,3 @@
 	esac
 	shift
 done
-
--- commoncpp2-1.2.4-orig/src/libccgnu2.pc.in	2004-06-02 12:28:07.000000000 -0500
+++ commoncpp2-1.2.4/src/libccgnu2.pc.in	2004-07-27 01:22:10.340442792 -0500
@@ -8,5 +8,4 @@
 Description: GNU Common C++ core library
 Version: @VERSION@
 Libs:  -lccgnu2 @DYN_LOADER@ @SOCKET_LIBS@ @GETOPT_LIBS@ @THREAD_LIBS@ 
-Cflags: @THREAD_FLAGS@ @CXXFLAGS@ -I@ccincludedir@
- 
+Cflags: @THREAD_FLAGS@ -I@ccincludedir@
--- commoncpp2-1.2.4-orig/src/libccext2.pc.in	2004-06-02 12:19:53.000000000 -0500
+++ commoncpp2-1.2.4/src/libccext2.pc.in	2004-07-27 01:22:19.161101848 -0500
@@ -8,5 +8,4 @@
 Version: @VERSION@
 Requires: libccgnu2 = @VERSION@, libxml-2.0
 Libs: -lccext2
-Cflags: @THREAD_FLAGS@ @CXXFLAGS@
- 
+Cflags: @THREAD_FLAGS@

--=-irHWqyyWYfp8iPCKeiCA--




From MAILER-DAEMON Sat Jul 31 10:18:47 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1BquhD-0006LY-Ig
	for mharc-bug-commoncpp@gnu.org; Sat, 31 Jul 2004 10:18:47 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1BquhC-0006LT-1O
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 10:18:46 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Bquh7-0006IP-Vq
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 10:18:45 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Bquh7-0006IC-Q5
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 10:18:41 -0400
Received: from [216.218.222.122] (helo=mail.ostel.com)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1BqudX-0002Py-OK
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 10:15:00 -0400
Received: by mail.ostel.com (Postfix, from userid 1005)
	id 6FE262F2890; Sat, 31 Jul 2004 07:18:24 -0700 (PDT)
Received: from [192.168.1.121] (pool-138-89-242-104.atc.east.verizon.net
	[138.89.242.104])
	by mail.ostel.com (Postfix) with ESMTP id ACFDC2F2883;
	Sat, 31 Jul 2004 07:18:17 -0700 (PDT)
Message-ID: <410BA958.3090101@ostel.com>
Date: Sat, 31 Jul 2004 10:14:48 -0400
From: David Sugar <dyfet@ostel.com>
User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Curtis Magyar <cumagyar@mts.net>
References: <1091237372.8706.20.camel@localhost>
In-Reply-To: <1091237372.8706.20.camel@localhost>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: bug-commoncpp@gnu.org
Subject: Re: BUG: CommonC++ includes compile time $CFLAGS in ccgnu2-config
 --flags
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jul 2004 14:18:46 -0000

I believe at the time the intent was to make sure that anything 
decendent from common c++ was also compiled with the same options.  This 
is important for some options, such as exception handling, but may cause 
issues with source build systems for others.  One problem is that a 
number of Common C++ specific options detected and set in the configure 
script, such as rtti settings, are currently set against CXXFLAGS rather 
than something seperate THREAD_FLAGS, and hence would also be lost with 
this patch.

I think the best solution would be to rework the configure tests to 
assure those compiler options which are set through tests always do make 
it into what ccgnu2-config --flags exports, and those things set by 
presetting CFLAGS/CXXFLAGS in front of configure do not.  Since these 
tested options are not related to threading itself. they probably should 
be represented with COMMMON_FLAGS rather than THREAD_FLAGS, so they are 
easier to identify.  Then ccgnu2-config --flags would export the value 
of THREAD_FLAGS & COMMON_FLAGS rather than THREAD_FLAGS & CXXFLAGS as it 
does now.

Curtis Magyar wrote:
> http://bugs.gentoo.org/show_bug.cgi?id=58515
> 
> I guess I should report this bug here too.  I filed it with the Gentoo
> bugzilla, but the patch should go upstream I think because this
> behaviour is very bad.
> 
> The problem is that if common c++ is compiled with $CFLAGS set, the
> ccgnu2-config script, and the pkg-config stuff in the devel branch both
> pass the CommonC++ compile time $CFLAGS on to anything compiled using
> those scripts.
> 
> There's a patch for 1.0.13 stable branch here:
> http://bugs.gentoo.org/attachment.cgi?id=36245&action=view
> 
> and I'll attach a patch for 1.2.4 that fixes ccgnu2-config, as well as
> the pkg-config files libccgnu2.pc and libccext2.pc.
> 
> Hopefully this will save someone else a bunch of time hunting down stray
> -march='s in their projects $CFLAGS.
> 
> Additionally (and unrelated to this bug), would it not be helpful if
> these two pkg-config files were called ccgnu2-1.2.pc and ccext2-1.2.pc
> to facilitate having multiple versions of the libraries installed?
> And the 'lib' prefix should be implied by the fact you're using the
> scripts in the first place.
> 
> 
> --
> Curtis Magyar
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --- commoncpp2-1.2.4-orig/src/ccgnu2-config.in	2004-05-30 10:12:55.000000000 -0500
> +++ commoncpp2-1.2.4/src/ccgnu2-config.in	2004-07-27 02:03:36.874432168 -0500
> @@ -11,7 +11,7 @@
>  
>  ost_cv_dynloader="@ost_cv_dynloader@"      
>  modflags="@MODULE_FLAGS@"
> -ccflags="@THREAD_FLAGS@ @CXXFLAGS@"
> +ccflags="@THREAD_FLAGS@"
>  cclink="@SOCKET_LIBS@ @GETOPT_LIBS@ @THREAD_LIBS@"
>  ccload="@DYN_LOADER@"
>  ccstd="@XML_LIBS@ @ZSTREAM_LIBS@"
> @@ -84,4 +84,3 @@
>  	esac
>  	shift
>  done
> -
> --- commoncpp2-1.2.4-orig/src/libccgnu2.pc.in	2004-06-02 12:28:07.000000000 -0500
> +++ commoncpp2-1.2.4/src/libccgnu2.pc.in	2004-07-27 01:22:10.340442792 -0500
> @@ -8,5 +8,4 @@
>  Description: GNU Common C++ core library
>  Version: @VERSION@
>  Libs:  -lccgnu2 @DYN_LOADER@ @SOCKET_LIBS@ @GETOPT_LIBS@ @THREAD_LIBS@ 
> -Cflags: @THREAD_FLAGS@ @CXXFLAGS@ -I@ccincludedir@
> - 
> +Cflags: @THREAD_FLAGS@ -I@ccincludedir@
> --- commoncpp2-1.2.4-orig/src/libccext2.pc.in	2004-06-02 12:19:53.000000000 -0500
> +++ commoncpp2-1.2.4/src/libccext2.pc.in	2004-07-27 01:22:19.161101848 -0500
> @@ -8,5 +8,4 @@
>  Version: @VERSION@
>  Requires: libccgnu2 = @VERSION@, libxml-2.0
>  Libs: -lccext2
> -Cflags: @THREAD_FLAGS@ @CXXFLAGS@
> - 
> +Cflags: @THREAD_FLAGS@
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp



From MAILER-DAEMON Sat Jul 31 23:02:49 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1Br6cb-0008WF-1X
	for mharc-bug-commoncpp@gnu.org; Sat, 31 Jul 2004 23:02:49 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1Br6cZ-0008Ua-G9
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 23:02:47 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1Br6cY-0008Tp-P3
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 23:02:47 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1Br6cY-0008Ti-La
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 23:02:46 -0400
Received: from [142.161.130.102] (helo=mx-mtaout01.mts.net)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Br6Yo-0000o7-Oo
	for bug-commoncpp@gnu.org; Sat, 31 Jul 2004 22:58:55 -0400
Received: from curtman.magyar ([142.161.35.203]) by mx-mtaout01.mts.net
	with ESMTP
	id <20040801025854.OMGT4492.mx-mtaout01.mts.net@curtman.magyar>;
	Sat, 31 Jul 2004 21:58:54 -0500
From: Curtis Magyar <cumagyar@mts.net>
To: bug-commoncpp@gnu.org
In-Reply-To: <410BA958.3090101@ostel.com>
References: <1091237372.8706.20.camel@localhost> <410BA958.3090101@ostel.com>
Content-Type: text/plain
Date: Sat, 31 Jul 2004 21:59:49 -0500
Message-Id: <1091329189.7875.10.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 1.5.90 
Content-Transfer-Encoding: 7bit
Cc: David Sugar <dyfet@ostel.com>
Subject: Re: BUG: CommonC++ includes compile time $CFLAGS in ccgnu2-config
	--flags
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Aug 2004 03:02:47 -0000

On Sat, 2004-07-31 at 10:14 -0400, David Sugar wrote:
> I believe at the time the intent was to make sure that anything 
> decendent from common c++ was also compiled with the same options.  This 
> is important for some options, such as exception handling, but may cause 
> issues with source build systems for others.  One problem is that a 
> number of Common C++ specific options detected and set in the configure 
> script, such as rtti settings, are currently set against CXXFLAGS rather 
> than something seperate THREAD_FLAGS, and hence would also be lost with 
> this patch.

It also seems to break libccext2.pc, because the header directory isn't
specified.  :(


> I think the best solution would be to rework the configure tests to 
> assure those compiler options which are set through tests always do make 
> it into what ccgnu2-config --flags exports, and those things set by 
> presetting CFLAGS/CXXFLAGS in front of configure do not.  Since these 
> tested options are not related to threading itself. they probably should 
> be represented with COMMMON_FLAGS rather than THREAD_FLAGS, so they are 
> easier to identify.  Then ccgnu2-config --flags would export the value 
> of THREAD_FLAGS & COMMON_FLAGS rather than THREAD_FLAGS & CXXFLAGS as it 
> does now.

I spent some time playing with the configure.in last night.  I'll
explore some more, and familiarize with the m4 stuff.  Hopefully I can
be of some help in straightening this out.

--
Curtis Magyar





