* Fix build with older versions of gcc.

This commit is contained in:
Sam Hocevar
2007-01-06 14:02:51 +00:00
committed by sam
parent bf0f51a97f
commit 9a7c211b57
2 changed files with 12 additions and 8 deletions
+11 -8
View File
@@ -37,15 +37,18 @@
extern int _zz_hasdebug;
#define WRITE_INT(fd, i, base) \
char buf[128], *b = buf + 127; \
if(i <= 0) \
write(fd, (i = -i) ? "-" : "0", 1); /* XXX: hack here */ \
while(i) \
do \
{ \
*b-- = hex2char[i % base]; \
i /= base; \
} \
write(fd, b + 1, buf + 127 - b)
char buf[128], *b = buf + 127; \
if(i <= 0) \
write(fd, (i = -i) ? "-" : "0", 1); /* XXX: hack here */ \
while(i) \
{ \
*b-- = hex2char[i % base]; \
i /= base; \
} \
write(fd, b + 1, buf + 127 - b); \
} while(0)
void _zz_debug(char const *format, ...)
{
+1
View File
@@ -32,6 +32,7 @@
#include <regex.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <sys/time.h>
#include <time.h>
#include <sys/wait.h>