Opened 15 years ago

Closed 14 years ago

#21298 closed defect (duplicate)

nvi 1.81.6_0 fails to build because of isblank macro

Reported by: qbarnes (Quentin Barnes) Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
Port: nvi

Description (last modified by tobypeterson)

nvi build busted on x86 10.5.8:

$ sudo port install -vv nvi
--->  Computing dependencies for nvi
--->  Building nvi
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_editors_nvi/work/nvi-1.81.6/dist" && /usr/bin/make -j4 all " returned error 2
[...]
In file included from /usr/include/_wctype.h:63,
                 from /usr/include/wchar.h:114,
                 from /opt/local/include/iconv.h:106,
                 from ./../common/conv.c:32:
/usr/include/ctype.h:241: error: syntax error before 'int'
make[1]: *** [conv.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
[...]

This may only happen if the libiconv port is installed, but didn't test that.

The problem is that common/key.h defines its own isblank() macro if one isn't defined. The problem is that the one defined in /usr/include/ctype.h is an inline function so the macro in key.h expands mangling the one in ctype.h.

Proposed fix is attached. isblank() is defined in c99 and later.

Please review Portfile change carefully. I'm not sure if I did revision right.

Attachments (2)

patch-common_key.h.diff (467 bytes) - added by qbarnes (Quentin Barnes) 15 years ago.
Patchfile to fix nvi's common/key.h
Portfile.patch (617 bytes) - added by qbarnes (Quentin Barnes) 15 years ago.
Patch file to fix nvi's Portfile

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by qbarnes (Quentin Barnes)

Attachment: patch-common_key.h.diff added

Patchfile to fix nvi's common/key.h

Changed 15 years ago by qbarnes (Quentin Barnes)

Attachment: Portfile.patch added

Patch file to fix nvi's Portfile

comment:1 Changed 15 years ago by tobypeterson

Description: modified (diff)
Version: 1.8.0

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to toby@…
Version: 1.8.0

comment:3 Changed 14 years ago by jmroot (Joshua Root)

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.