[m-rev.] for review: port Mercury to MacOS X 10.6

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Oct 10 20:01:34 AEDT 2009

Hi Ian,

On Sat, 10 Oct 2009, Ian MacLarty wrote:

> I've been testing this change on saturn and my change to
> mercury_event_scanner.l is causing problems.  The problem is that on
> saturn flex is generating
> int mercury_event_get_leng (void );
> and on Mac OS it's generating:
> yy_size_t mercury_event_get_leng (void );
> even though they are both using exactly the same version of flex (2.5.35).
> The comments above the declaration of mercury_event_get_leng in
> mercury_event_scanner.l say:
> ** Add the declarations for local functions that flex is too lazy to add.
> however flex 2.5.35 *is* generating declarations for these functions
> in mercury_event_scanner.c.

Although on Linux (both 32- and 64-bit) the return type of
mercury_event_get_leng() is an int, not yy_size_t (which is an unsigned

> Shall I remove the declaration in mercury_event_scanner.l or can
> someone suggest an alternative fix?

The simplest fix is to remove the declaration; it will cause a bit of noise
during compilation but that's preferable to things not working.  The
problem should eventually go away as older versions of flex are replaced.

We could get configure to check the flex version and generate the
required declarations as needed; in this case that seems like overkill

mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au

More information about the reviews mailing list