macro gh_init from /usr/include/guile/gh.h has a syntax error

Bug #49627 reported by Mark Jenkins
6
Affects Status Importance Assigned to Milestone
guile-1.6 (Ubuntu)
Confirmed
Low
Unassigned
Nominated for Dapper by Mark Jenkins

Bug Description

Binary package hint: guile-1.6-dev

The macro gh_init from /usr/include/guile/gh.h has a syntax error that becomes aparent when you try to use it.

C code
#include <guile/gh.h>
void main()
{
    gh_init();
}

results in
error: syntax error before ‘)’ token
error: command 'gcc' failed with exit status 1

$ gcc --version
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

The macro definition is:
#define gh_init () scm_init_guile ()
The space after gh_init is the problem, it should really be
#define gh_init() scm_init_guile ()

Revision history for this message
Mark Jenkins (mark-parit) wrote : A patch that fixes the problem

A patch to libguile/gh.h in the source tree that fixes the problem. Reasoning explained in the bug report.
From inside the source tree patch with
$ patch -p1 < gh_dot_h_gh_init_macro_syntax_error.diff

Revision history for this message
Rich Johnson (nixternal) wrote :

Attached patch does in fact fix the issue as well. Will check upstream and package if necessary.

Changed in guile-1.6:
importance: Undecided → Low
status: Unconfirmed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.