From MAILER-DAEMON Wed Dec 19 09:20:49 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1J4zmz-0006TN-8w
	for mharc-bug-commoncpp@gnu.org; Wed, 19 Dec 2007 09:20:49 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1J2o7g-0003sL-0m
	for bug-commoncpp@gnu.org; Thu, 13 Dec 2007 08:29:08 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1J2o7e-0003rA-T2
	for bug-commoncpp@gnu.org; Thu, 13 Dec 2007 08:29:07 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1J2o7e-0003qt-Ia
	for bug-commoncpp@gnu.org; Thu, 13 Dec 2007 08:29:06 -0500
Received: from 30.mail-out.ovh.net ([213.186.62.213])
	by monty-python.gnu.org with smtp (Exim 4.60)
	(envelope-from <philippe.mbakobmbakob@elodig.fr>) id 1J2o7e-0003Db-BM
	for bug-commoncpp@gnu.org; Thu, 13 Dec 2007 08:29:06 -0500
Received: (qmail 29522 invoked by uid 503); 13 Dec 2007 13:29:33 -0000
Received: (QMFILT: 1.0); 13 Dec 2007 13:29:33 -0000
Received: from gw2.ovh.net (HELO mail22.ha.ovh.net) (213.251.189.202)
	by 30.mail-out.ovh.net with SMTP; 13 Dec 2007 13:29:33 -0000
Received: from b0.ovh.net (HELO queue-out) (213.186.33.50)
	by b0.ovh.net with SMTP; 13 Dec 2007 13:28:51 -0000
Received: from gw-dtc.efrei.fr (HELO ?192.168.17.186?) (192.102.224.64)
	by ns0.ovh.net with SMTP; 13 Dec 2007 13:28:50 -0000
Message-ID: <47613572.6010208@elodig.fr>
Date: Thu, 13 Dec 2007 14:36:50 +0100
From: Philippe Mbakob Mbakob <philippe.mbakobmbakob@elodig.fr>
User-Agent: Thunderbird 2.0.0.6 (X11/20071022)
MIME-Version: 1.0
To: Bug-commoncpp@gnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Ovh-Remote: 192.102.224.64 (gw-dtc.efrei.fr)
X-Ovh-Local: 213.186.33.20 (ns0.ovh.net)
X-Spam-Check: DONE|H 0.500021/N
X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6
X-Mailman-Approved-At: Wed, 19 Dec 2007 09:20:47 -0500
Cc: 
Subject: problem about TCPStream
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, 13 Dec 2007 13:29:08 -0000

hi,

I'm using ost:TCPStream to develop a client-server application and i 
have a  problem  when in my server. When i try to receive message from 
client using operator >>, it work fine only if there is no space 
character in my message.

my class SERVER inherit from ost:TCPStream. And when i received a msg a 
method using the code below is called.

string msg;

while( this->isPending(Socket::pendingInput, 1000) && ( !this->eof() ) )
{
      *(this) >> msg;
}


For example, if i send "hello world", the server will only receive"hello".

Please can you help me?

thanks

--
Philippe



From MAILER-DAEMON Mon Dec 24 04:41:54 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1J6jon-0001uB-OD
	for mharc-bug-commoncpp@gnu.org; Mon, 24 Dec 2007 04:41:53 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1J6jol-0001sz-5E
	for bug-commoncpp@gnu.org; Mon, 24 Dec 2007 04:41:51 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1J6joj-0001sG-8m
	for bug-commoncpp@gnu.org; Mon, 24 Dec 2007 04:41:50 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1J6joj-0001s9-2X
	for bug-commoncpp@gnu.org; Mon, 24 Dec 2007 04:41:49 -0500
Received: from [213.131.245.113] (helo=smtp.tmcs.ch)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <dev-zero@gentoo.org>) id 1J6joi-00062y-BJ
	for bug-commoncpp@gnu.org; Mon, 24 Dec 2007 04:41:49 -0500
Received: from neuromancer.neuronics-tp.ch (77-57-123-120.dclient.hispeed.ch
	[77.57.123.120])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by smtp.tmcs.ch (Postfix) with ESMTP id 9AC0E1406EE8
	for <bug-commoncpp@gnu.org>; Mon, 24 Dec 2007 10:43:07 +0100 (CET)
Date: Mon, 24 Dec 2007 10:40:29 +0100
From: Tiziano =?iso-8859-1?Q?M=FCller?= <dev-zero@gentoo.org>
To: bug-commoncpp@gnu.org
Message-ID: <20071224094029.GA16502@neuromancer.neuronics-tp.ch>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="gj572EiMnwbLXET9"
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-09)
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1)
Subject: Patch to fix detection of {bits,ext}/atomicity.h with gcc >=4.2.0
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, 24 Dec 2007 09:41:51 -0000


--gj572EiMnwbLXET9
Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk"
Content-Disposition: inline


--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi there,

Since the bits/atomicity.h has been moved to ext/atomicity.h for gcc
>=3D4.2.0, a couple applications depending on commoncpp2 show build errors
>when building.
One part of the patch updates m4/ost_pthread.m4 to check for
ext/atomicity.h as well, the other part adds HAVE_EXT_ATOMICITY.H to
config.h.in and adds a define switch to include the right header-file.

I'd not hardcode either bits/atomicity.h or ext/atomicity.h depending on
the configure-results in the config.h since someone might build/have
built commoncpp with gcc-4.1.0 and then build the app with gcc-4.2.2
(or vice versa).

Cheers,
Tiziano

--=20
Tiziano M=FCller
Gentoo Linux Developer
Areas of responsibility: Samba, PostgreSQL, cpp, Python
E-Mail     : dev-zero@gentoo.org
GnuPG FP   : F327 283A E769 2E36 18D5  4DE2 1B05 6A63 AE9C 1E30

--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="1.6.1-gcc42_atomicity.patch"
Content-Transfer-Encoding: quoted-printable

diff -Naur commoncpp2-1.6.1.orig/config.h.in commoncpp2-1.6.1/config.h.in
--- commoncpp2-1.6.1.orig/config.h.in	2007-12-24 09:45:11.000000000 +0100
+++ commoncpp2-1.6.1/config.h.in	2007-12-24 10:25:43.000000000 +0100
@@ -239,6 +239,9 @@
 /* Define to 1 if you have the <bits/atomicity.h> header file. */
 #undef HAVE_BITS_ATOMICITY_H
=20
+/* Define to 1 if you have the <ext/atomicity.h> header file. */
+#undef HAVE_EXT_ATOMICITY_H
+
 /* Define to 1 if you have the <bits/wordsize.h> header file. */
 #undef HAVE_BITS_WORDSIZE_H
=20
@@ -1088,7 +1091,11 @@
=20
 #if defined(__cplusplus)
 #if defined(HAVE_GCC_BITS_ATOMIC) || defined(HAVE_GCC_CXX_BITS_ATOMIC)
+#if (__GNUC__ > 4) || ((__GNUC__ =3D=3D 4) && (__GNUC_MINOR__ >=3D 2))
+#include <ext/atomicity.h>
+#else
 #include <bits/atomicity.h>
+#endif
 #define HAVE_ATOMIC
 #endif
 #endif
diff -Naur commoncpp2-1.6.1.orig/m4/ost_pthread.m4 commoncpp2-1.6.1/m4/ost_=
pthread.m4
--- commoncpp2-1.6.1.orig/m4/ost_pthread.m4	2007-12-24 09:45:11.000000000 +=
0100
+++ commoncpp2-1.6.1/m4/ost_pthread.m4	2007-12-24 10:12:24.000000000 +0100
@@ -92,7 +92,9 @@
   dnl check for gcc's bits/atomicity and the atomic functions therein
   AC_CHECK_HEADERS([bits/atomicity.h],
 	ost_cv_bits_atomicity=3Dyes,
-	ost_cv_bits_atomicity=3Dno)
+	[AC_CHECK_HEADERS([ext/atomicity.h],
+		ost_cv_bits_atomicity=3Dyes,
+		ost_cv_bits_atomicity=3Dno)])
   if test $ost_cv_bits_atomicity =3D yes ; then
       AC_MSG_CHECKING([for _Atomic_word])
       AC_TRY_COMPILE([#include <bits/atomicity.h>],
@@ -103,7 +105,15 @@
 	    ],
 	    [ost_cv_gcc_atomic=3Dyes
 	     AC_DEFINE(HAVE_GCC_BITS_ATOMIC, [1], [has gcc atomic functions])],
-	    [ost_cv_gcc_atomic=3Dno])
+	    [AC_TRY_COMPILE([#include <ext/atomicity.h>],
+		    [
+		    _Atomic_word i =3D 0;
+		    __atomic_add(&i, 1);
+		    __exchange_and_add(&i, 1);
+		    ],
+		    [ost_cv_gcc_atomic=3Dyes
+		    AC_DEFINE(HAVE_GCC_BITS_ATOMIC, [1], [has gcc atomic functions])],
+		    [ost_cv_gcc_atomic=3Dno])])
       AC_MSG_RESULT($ost_cv_gcc_atomic)
=20
       AC_MSG_CHECKING([for __gnu_cxx::_Atomic_word])
@@ -117,7 +127,17 @@
 	    [ost_cv_gcc_cxx_atomic=3Dyes
 	     AC_DEFINE(HAVE_GCC_CXX_BITS_ATOMIC, [1],=20
 		[has __gnu_cxx atomic functions])],
-	    [ost_cv_gcc_cxx_atomic=3Dno])
+	    [AC_TRY_COMPILE([#include <ext/atomicity.h>],
+		    [
+		    using namespace __gnu_cxx;
+		    _Atomic_word i =3D 0;
+		    __atomic_add(&i, 1);
+		    __exchange_and_add(&i, 1);
+		    ],
+		    [ost_cv_gcc_cxx_atomic=3Dyes
+		     AC_DEFINE(HAVE_GCC_CXX_BITS_ATOMIC, [1],=20
+			[has __gnu_cxx atomic functions])],
+		    [ost_cv_gcc_cxx_atomic=3Dno])])
       AC_MSG_RESULT($ost_cv_gcc_cxx_atomic)
   fi
=20

--qDbXVdCdHGoSgWSk--

--gj572EiMnwbLXET9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQBHb36NGwVqY66cHjARAiz2AJwK5IIn9KlPm9ufaN9iftSdLvmtdgCfcWDM
KmtiwaMqvYyQ2EcS3N9ti8Q=
=Mf08
-----END PGP SIGNATURE-----

--gj572EiMnwbLXET9--



