Project

General

Profile

Bug #514

Recent Changes to libxdrf.c break compiles on win64

Added by Kyle Beauchamp about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

This refers to the release-4-5 patches branch as of Sun aug. 22.

My compiles fail with errors (see end of message). The offending code was recently fixed and is this segment:

int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision) {
int *ip = NULL;
int *buf = NULL;
bool bRead;

bRead = (xdrs->x_op == XDR_DECODE);
/* preallocate a small buffer and ip on the stack - if we need more
we can always malloc(). This is faster for small values of size: */
int prealloc_size=3*16;
int prealloc_ip[3*16], prealloc_buf[3*20];
int we_should_free=0;

3>libxdrf.c
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(808) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(809) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(810) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(812) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(813) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(814) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(815) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(816) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(817) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(818) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(819) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(820) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(822) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(823) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(824) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(825) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(826) : error C2143: syntax error : missing ';' before 'type'
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(828) : error C2065: 'bitsizeint' : undeclared identifier
3>Y:\fah_windows_build\gromacs-aug22\src\gmxlib\libxdrf.c(828) : error C2109: subscript requires array or pointer type

History

#1 Updated by Kyle Beauchamp about 9 years ago

PS A fix is to move

bRead = (xdrs->x_op == XDR_DECODE);

until after all declarations.

#2 Updated by Erik Lindahl about 9 years ago

Fixed in commit 0fb8c94b9ef4ac8958ec06a25d52ca38234c16ea. This was just a stupid mistake - I just assumed the declarations were finished when the comment started, and didn't check...

Also available in: Atom PDF