Posix says ssize_t is in sys/types.h; on Linux stdlib.h is enough.
-#include "config.h"
#include <ccan/tally/tally.h>
#include <ccan/build_assert/build_assert.h>
#include <ccan/likely/likely.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
+#include <stdlib.h>
#define SIZET_BITS (sizeof(size_t)*CHAR_BIT)
#ifndef CCAN_TALLY_H
#define CCAN_TALLY_H
-#include <stdlib.h>
+#include "config.h"
+#include <sys/types.h>
struct tally;
ok1(tally_mean(tally) == 0);
}
+ free(tally);
return exit_status();
}
ok1(median - (ssize_t)err <= i/2
&& median + (ssize_t)err >= i/2);
}
+ free(tally);
return exit_status();
}
ok1(tally_max(tally) == i);
ok1(tally_min(tally) == -i);
}
+ free(tally);
return exit_status();
}
ok1(mode - (ssize_t)err <= 0 && mode + (ssize_t)err >= 0);
}
+ free(tally);
return exit_status();
}
ok1(tally->counts[0] == 2);
ok1(tally->counts[1] == 0);
+ free(tally);
return exit_status();
}