[zeromq-dev] error: ISO C++ 1998 does not support 'long long'

Peter Kleiweg pkleiweg at xs4all.nl
Wed Oct 23 22:36:23 CEST 2013

Pieter Hintjens schreef op de 23e dag van de wijnmaand van het jaar 2013:

> On Wed, Oct 23, 2013 at 6:49 PM, Peter Kleiweg <pkleiweg at xs4all.nl> wrote:
> > In test_stream_to_dealer, some fields are shifted 5 bytes to the
> > right. If I change the test like below, the test passes.
> It's not related to use of libsodium in any way. Could be some code
> that's not properly portable. Could you get a dump of the whole buffer
> received?

Another thing. This part of test_stream.cpp:

    //  Second frame contains the rest of greeting along with
    //  the Ready command
    int bytes_read = 0;
    while (bytes_read < 97) {
        rc = zmq_recv (stream, buffer + bytes_read, 255 - bytes_read, 0);
        fprintf(stderr, "Bytes read: %i\n", rc);  // I ADDED THIS
        assert (rc >= 0);
        bytes_read += rc;

When the test succeeds, it reads 97 bytes in one go:
Bytes read: 97

When the test fails, it reads in three steps:
Bytes read: 54
Bytes read: 5
Bytes read: 43

The five bytes of the second read are the inserted wrong bytes.

Peter Kleiweg

More information about the zeromq-dev mailing list