build: Fix inter-directory dependencies
[libguestfs.git] / daemon / proto.c
index c0e3927..a0d3736 100644 (file)
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
-#include <ctype.h>
 #include <sys/param.h>         /* defines MIN */
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 
+#include "c-ctype.h"
+#include "ignore-value.h"
+
 #include "daemon.h"
 #include "../src/guestfs_protocol.h"
 
@@ -53,13 +55,11 @@ main_loop (int _sock)
   sock = _sock;
 
   for (;;) {
-#if 0
     /* Most common errors are leaked memory and leaked file descriptors,
      * so run this between each command:
      */
-    if (verbose)
-      system ("ls -l /proc/self/fd");
-#endif
+    if (verbose && 0)
+      ignore_value (system ("ls -l /proc/self/fd"));
 
     /* Read the length word. */
     if (xread (sock, lenbuf, 4) == -1)
@@ -96,7 +96,7 @@ main_loop (int _sock)
           printf ("   ");
         printf ("|");
         for (j = i; j < MIN (i+16, len); ++j)
-          if (isprint (buf[j]))
+          if (c_isprint (buf[j]))
             printf ("%c", buf[j]);
           else
             printf (".");