[Lldb-commits] [lldb] r313437 - Check availability of accept4 in C++ instad of C code.

Eugene Zemtsov via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 18 11:24:30 PDT 2017


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++.
LLDB uses accept4 in C++ code thus it makes sense to test availability of
this function in C++ mode.

On Mon, Sep 18, 2017 at 9:58 AM, Stephane Sezer <sas at cd80.net> wrote:

> What difference does this make?
>
> On Fri, Sep 15, 2017 at 8:00 PM Eugene Zemtsov via lldb-commits <
> lldb-commits at lists.llvm.org> wrote:
>
>> Author: eugene
>> Date: Fri Sep 15 19:58:49 2017
>> New Revision: 313437
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=313437&view=rev
>> Log:
>> Check availability of accept4 in C++ instad of C code.
>>
>> Modified:
>>     lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
>>
>> Modified: lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/
>> modules/LLDBGenerateConfig.cmake?rev=313437&r1=313436&r2=313437&view=diff
>> ============================================================
>> ==================
>> --- lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake (original)
>> +++ lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake Fri Sep 15
>> 19:58:49 2017
>> @@ -9,7 +9,7 @@ set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SO
>>  check_symbol_exists(ppoll poll.h HAVE_PPOLL)
>>  set(CMAKE_REQUIRED_DEFINITIONS)
>>  check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
>> -check_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
>> +check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
>>
>>  check_include_file(termios.h HAVE_TERMIOS_H)
>>  check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
>>
>>
>> _______________________________________________
>> lldb-commits mailing list
>> lldb-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>>
> --
> --
> Stephane Sezer
>



-- 
Thanks,
Eugene Zemtsov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170918/a89f4baa/attachment.html>


More information about the lldb-commits mailing list