The DEBUG macro enabled by --enable-debug is actually LIBGTOP_ENABLE_DEBUG.

This commit is contained in:
Benoit Dejean
2015-02-28 00:20:28 +01:00
committed by Robert Roth
parent a3a16707b5
commit a93dc2526d
11 changed files with 22 additions and 22 deletions

View File

@@ -27,7 +27,7 @@ void
do_output (int s, glibtop_response *resp, off_t offset,
size_t data_size, const void *data)
{
#ifdef DEBUG
#ifdef LIBGTOP_ENABLE_DEBUG
fprintf (stderr, "Really writing %d bytes at offset %lu.\n",
sizeof (glibtop_response), offset);
#endif
@@ -44,7 +44,7 @@ do_output (int s, glibtop_response *resp, off_t offset,
}
if (resp->data_size) {
#ifdef DEBUG
#ifdef LIBGTOP_ENABLE_DEBUG
fprintf (stderr, "Writing %d bytes of data.\n", resp->data_size);
#endif
@@ -88,7 +88,7 @@ do_read (int s, void *ptr, size_t total_size)
tmp_ptr += nread;
ptr = tmp_ptr;
#ifdef DEBUG
#ifdef LIBGTOP_ENABLE_DEBUG
fprintf (stderr, "READ (%d): %d - %d - %d\n",
nread, already_read, remaining, total_size);
#endif

View File

@@ -26,8 +26,8 @@
#ifndef PARENT_DEBUG
#define PARENT_DEBUG 1
#endif
#ifndef DEBUG
#define DEBUG 1
#ifndef LIBGTOP_ENABLE_DEBUG
#define LIBGTOP_ENABLE_DEBUG 1
#endif
#endif

View File

@@ -42,7 +42,7 @@ glibtop_send_version (glibtop *server, int fd)
size = strlen (buffer) + 1;
#ifdef DEBUG
#ifdef LIBGTOP_ENABLE_DEBUG
fprintf (stderr, "SERVER ID: |%s|\n", buffer);
#endif