<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Greetings.</div><div class=""><br class=""></div><div class="">I am trying to resolve an issue installing GNU Octave with the MacPorts system.</div><div class=""><br class=""></div><div class="">Octave includes qscilexeroctave.h, which includes a whole bunch of other files until it gets to a header file from Gnulib.</div><div class="">Gnulib attempts to add a security warning to the C functions gets.</div><div class="">Because qscilexeroctave.h wraps everything in “extern "C++",” there is a conflict between the linkages of gets (C vs C++).</div><div class=""><br class=""></div><div class="">A few solutions have been proposed in the various discussions about this problem (see references below).</div><div class="">On solution is to remove the “extern "C++"” from the Qt4Qt5/Qsci/*.h qscintilla header files:</div><div class=""><br class=""></div><div class=""><div class="">-#ifdef __APPLE__                                                                                                                                                                                           </div><div class="">-extern "C++" {                                                                                                                                                                                             </div><div class="">-#endif</div></div><div class="">...</div><div class=""><div class="">-#ifdef __APPLE__                                                                                                                                                                                           </div><div class="">-}                                                                                                                                                                                                          </div><div class="">-#endif </div></div><div class=""><br class=""></div><div class="">For me, qscintilla and Octave both build fine after the change.</div><div class=""><br class=""></div><div class="">Is this a safe change?</div><div class="">Any insight into why forcing C++ linkage is necessary (but just on Macs) would be appreciated.</div><div class=""><br class=""></div><div class="">Is this a change that can be considered upstream?</div><div class=""><br class=""></div><div class="">Thank you,</div><div class="">Marcus</div><div class=""><br class=""></div><div class="">Bug References:</div><div class=""><a href="https://trac.macports.org/ticket/51399" class="">https://trac.macports.org/ticket/51399</a></div><a href="http://octave.1599824.n4.nabble.com/build-failure-on-OSX-10-9-td4659114.html" class="">http://octave.1599824.n4.nabble.com/build-failure-on-OSX-10-9-td4659114.html</a><div class=""><a href="http://savannah.gnu.org/bugs/?43243" class="">http://savannah.gnu.org/bugs/?43243</a></div><div class="">​<a href="http://octave.1599824.n4.nabble.com/Building-3-8-0-on-Mountain-Lion-10-8-5-td4660795.html" class="">http://octave.1599824.n4.nabble.com/Building-3-8-0-on-Mountain-Lion-10-8-5-td4660795.html</a></div><div class=""><br class=""></div><div class="">Software References:</div><div class=""><a href="https://www.gnu.org/software/octave/" class="">https://www.gnu.org/software/octave/</a></div><div class=""><a href="https://www.macports.org" class="">https://www.macports.org</a></div><div class=""><a href="https://www.gnu.org/software/gnulib/" class="">https://www.gnu.org/software/gnulib/</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>