MapServer / MapServer

Source code of the MapServer project. Please submit pull requests to the 'main' branch.
https://mapserver.org
Other
1.02k stars 371 forks source link

inline use for C code fails with MSVC2003 #3095

Closed mapserver-bot closed 12 years ago

mapserver-bot commented 12 years ago

Reporter: warmerdam Date: 2009/08/14 - 16:35 Trac URL: http://trac.osgeo.org/mapserver/ticket/3095 Building MapServer trunk causes a build failure due to use of inline attribute for functions compiled as C code.

        cl /nologo /Ox /MD /W3  /EHsc -I/osgeo4w/include/gd  -I/osgeo4w/include
   -I\osgeo4w\include\regex-0.12                -Ic:\warmerda\mapserver\..\zlib-
1.2.3   -I/osgeo4w/include/freetype     -DHAVE_STRING_H -DREGEX_MALLOC -DNEED_ST
RCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT -DNEED_STRRSTR -DNEED_STRCASESTR
 -DUSE_JPEG -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_GIF -DGD_HAS_GDIMA
GEGIFPTR -DUSE_GD_FT -DGD_HAS_GETBITMAPFONT -DGD_HAS_FTEX_XSHOW   -DUSE_THREAD
  -DIGNORE_MISSING_DATA               -DUSE_GD_ANTIALIAS       -DUSE_ZLIB    -DU
SE_AGG      -DWIN32 -D_WIN32 /c mapbits.c /Fomapbits.obj
mapbits.c
c:\warmerda\mapserver\mapserver.h(2541) : error C2054: expected '(' to follow 'i
nline'
c:\warmerda\mapserver\mapserver.h(2541) : error C2085: 'msBufferInit' : not in f
ormal parameter list

I was able to build after removing the inline attribute from the buffer functions, and populateRendererVTableCairoVector.

Is it really legal C to use inline? Should we make it a macro so it can be selectively disabled for compilers that don't support it?

mapserver-bot commented 12 years ago

Author: warmerdam Date: 2009/08/14 - 16:37 Adding tbonfort who appears to have added all inline use. I am willing to craft a conditional inline patch if desired.

mapserver-bot commented 12 years ago

Author: warmerdam Date: 2009/10/09 - 23:07 I have not been able to reproduce this with VS2003 on my normal FWTools build, so I'm rather confused. I'm going to close for now, we can reopen if the problem comes up elsewhere.