<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">In GNU C Library, accept4 is guarded by __USE_GNU macro. Whether this macro is defined or not can depend on the compiler and its arguments for C and C++. </div><div class="gmail_default" style="font-family:verdana,sans-serif">LLDB uses accept4 in C++ code thus it makes sense to test availability of this function in C++ mode.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 18, 2017 at 9:58 AM, Stephane Sezer <span dir="ltr"><<a href="mailto:sas@cd80.net" target="_blank">sas@cd80.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What difference does this make?</div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 15, 2017 at 8:00 PM Eugene Zemtsov via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: eugene<br>
Date: Fri Sep 15 19:58:49 2017<br>
New Revision: 313437<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=313437&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=313437&view=rev</a><br>
Log:<br>
Check availability of accept4 in C++ instad of C code.<br>
<br>
Modified:<br>
lldb/trunk/cmake/modules/<wbr>LLDBGenerateConfig.cmake<br>
<br>
Modified: lldb/trunk/cmake/modules/<wbr>LLDBGenerateConfig.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake?rev=313437&r1=313436&r2=313437&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/cmake/<wbr>modules/LLDBGenerateConfig.<wbr>cmake?rev=313437&r1=313436&r2=<wbr>313437&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/cmake/modules/<wbr>LLDBGenerateConfig.cmake (original)<br>
+++ lldb/trunk/cmake/modules/<wbr>LLDBGenerateConfig.cmake Fri Sep 15 19:58:49 2017<br>
@@ -9,7 +9,7 @@ set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SO<br>
check_symbol_exists(ppoll poll.h HAVE_PPOLL)<br>
set(CMAKE_REQUIRED_<wbr>DEFINITIONS)<br>
check_symbol_exists(sigaction signal.h HAVE_SIGACTION)<br>
-check_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)<br>
+check_cxx_symbol_exists(<wbr>accept4 "sys/socket.h" HAVE_ACCEPT4)<br>
<br>
check_include_file(termios.h HAVE_TERMIOS_H)<br>
check_include_files("sys/<wbr>types.h;sys/event.h" HAVE_SYS_EVENT_H)<br>
<br>
<br>
______________________________<wbr>_________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-commits</a><br>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div class="m_8653702499090051280gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <br>Stephane Sezer</div></div>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="verdana, sans-serif">Thanks,</font><div><font face="verdana, sans-serif">Eugene Zemtsov.</font></div></div></div>
</div>