[tlbuild] build failure: duplicated extern "C" definition of getopt() when compiling a C++ program
Vladimir Volovich
vvv at vsu.ru
Sun Jun 6 23:30:47 CEST 2010
"KB" == Karl Berry writes:
KB> Can't we just remove the getopt() declaration in the non-stdc case?
KB> Does that work for your compilations?
on my 2 platforms, getopt prototype is defined in unistd.h, so removing
getopt() declaration will certainly work for me (and there's still one
left there, which should be removed, if you'll choose to go this path).
i wanted to propose a more "portable" approach of detecting the presence
of the prototype in unistd.h and defining our own prototype if there's
no prototype in unistd.h, for the sake of some other systems.
Best,
v.
More information about the tlbuild
mailing list