1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

Everywhere: Use CMake to generate AK/Debug.h.

This was done with the help of several scripts, I dump them here to
easily find them later:

    awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in

    for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in)
    do
        find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \;
    done

    # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list.
    awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
This commit is contained in:
asynts 2021-01-23 23:29:11 +01:00 committed by Andreas Kling
parent 76f2918416
commit 1a3a0836c0
59 changed files with 475 additions and 459 deletions

View file

@ -77,7 +77,7 @@ String TLSv12::read_line(size_t max_size)
bool TLSv12::write(ReadonlyBytes buffer)
{
if (m_context.connection_status != ConnectionStatus::Established) {
#ifdef TLS_DEBUG
#if TLS_DEBUG
dbgln("write request while not connected");
#endif
return false;
@ -193,7 +193,7 @@ bool TLSv12::check_connection_state(bool read)
{
if (!Core::Socket::is_open() || !Core::Socket::is_connected() || Core::Socket::eof()) {
// an abrupt closure (the server is a jerk)
#ifdef TLS_DEBUG
#if TLS_DEBUG
dbgln("Socket not open, assuming abrupt closure");
#endif
m_context.connection_finished = true;
@ -216,7 +216,7 @@ bool TLSv12::check_connection_state(bool read)
m_context.application_buffer.size());
} else {
m_context.connection_finished = false;
#ifdef TLS_DEBUG
#if TLS_DEBUG
dbgln("FINISHED");
#endif
}
@ -237,7 +237,7 @@ bool TLSv12::flush()
if (out_buffer_length == 0)
return true;
#ifdef TLS_DEBUG
#if TLS_DEBUG
dbgln("SENDING...");
print_buffer(out_buffer, out_buffer_length);
#endif