Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#2030 closed defect (wontfix)

mapparser.c generated does not work for windows

Reported by: assefa Owned by: mapserverbugs
Priority: high Milestone:
Component: Build Problems Version: 5.0
Severity: normal Keywords:
Cc:

Description

I tried to build 4.10.1 on Windows with a mapparse.c generated on a linux and
could not do it out of the box : around line 1014 here is what was generated :

...
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
int
yyparse ()
    ;
#endif
#endif
{
...

 In the case of windows, I had to remove last ; 

 Not sure if we need to define __cplusplus but in any case, the generated code
is invalid.

Change History (3)

comment:1 by assefa, 17 years ago

Forgot to mention that after the cahnes, It builds and works properly.

comment:2 by dmorissette, 17 years ago

Cc: steve.lime@… added
Resolution: wontfix
Status: newclosed
This broken mapparser.c was generated by bison v 2.1 on a Ubuntu system.

I just checked on an older (FC1) system with bison 1.875 and it generates almost
the same block of code as above, but without the stray ';', so it seems that
this problem would have been introcudes in bison between v1.875 and 2.1.

I don't think there is much we can do about this directly in Mapserver (other
than being aware of the issue), so I'll close as WONTFIX.

comment:3 by dmorissette, 17 years ago

I Googled for this problem and found a few other places referring to the same
issue and telling their users to stick to bison 1.875 or remove the stray
';''because 2.1 generated files are not compatible with VC++.

However I didn't find anything official about this in bison lists or bugs
reports (well, I simply didn't find any bug tracker).
Note: See TracTickets for help on using tickets.