Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#461 closed defect (fixed)

api_replicate.cc doesn't compile under Visual C++

Reported by: Charlie Hull Owned by: Olly Betts
Priority: normal Milestone: 1.1.5
Component: Test Suite Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Microsoft Windows

Description

The function truncated_copy contains a buffer allocated in a way Visual C++ doesn't like, giving the errors:

.\api_replicate.cc(110) : error C2057: expected constant expression
.\api_replicate.cc(110) : error C2466: cannot allocate an array of constant size
 0
.\api_replicate.cc(110) : error C2133: 'buf' : unknown size

A malloc should fix this.

Attachments (1)

patch41.patch (1.8 KB ) - added by Charlie Hull 14 years ago.
Patch for MSVC makefiles - add in some new files in testsuite

Download all attachments as: .zip

Change History (4)

comment:1 by Richard Boulton, 14 years ago

Fixed in r14313 by using a fixed size buffer, and repeating the read/write cycle if necessary.

Please close if this fixes the problem under Visual C++.

comment:2 by Charlie Hull, 14 years ago

Resolution: fixed
Status: newclosed

Yes that's got it, attached is a small patch to keep up with recent changes to the test harness - if you could apply this I'd be grateful.

by Charlie Hull, 14 years ago

Attachment: patch41.patch added

Patch for MSVC makefiles - add in some new files in testsuite

comment:3 by Olly Betts, 14 years ago

Milestone: 1.1.5

Richard seems to have applied the patch.

Marking fixed in 1.1.5.

Note: See TracTickets for help on using tickets.