Changeset 1578 for zzuf


Ignore:
Timestamp:
Jan 6, 2007, 3:02:51 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Fix build with older versions of gcc.
Location:
zzuf/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/debug.c

    r1550 r1578  
    3838
    3939#define WRITE_INT(fd, i, base) \
    40     char buf[128], *b = buf + 127; \
    41     if(i <= 0) \
    42         write(fd, (i = -i) ? "-" : "0", 1); /* XXX: hack here */ \
    43     while(i) \
     40    do \
    4441    { \
    45         *b-- = hex2char[i % base]; \
    46         i /= base; \
    47     } \
    48     write(fd, b + 1, buf + 127 - b)
     42        char buf[128], *b = buf + 127; \
     43        if(i <= 0) \
     44            write(fd, (i = -i) ? "-" : "0", 1); /* XXX: hack here */ \
     45        while(i) \
     46        { \
     47            *b-- = hex2char[i % base]; \
     48            i /= base; \
     49        } \
     50        write(fd, b + 1, buf + 127 - b); \
     51    } while(0)
    4952
    5053void _zz_debug(char const *format, ...)
  • zzuf/trunk/src/zzuf.c

    r1577 r1578  
    3333#include <string.h>
    3434#include <errno.h>
     35#include <signal.h>
    3536#include <sys/time.h>
    3637#include <time.h>
Note: See TracChangeset for help on using the changeset viewer.