bsdiff.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Index: bsdiff.c
  2. --- bsdiff.c.orig 2005-08-17 00:13:52.000000000 +0200
  3. +++ bsdiff.c 2005-08-17 09:17:36.626825000 +0200
  4. @@ -31,12 +31,12 @@
  5. #include <sys/types.h>
  6. #include <bzlib.h>
  7. -#include <err.h>
  8. #include <fcntl.h>
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <string.h>
  12. #include <unistd.h>
  13. +#include "err.h"
  14. #define MIN(x,y) (((x)<(y)) ? (x) : (y))
  15. Index: bspatch.c
  16. --- bspatch.c.orig 2005-08-17 00:14:00.000000000 +0200
  17. +++ bspatch.c 2005-08-17 09:17:36.627758000 +0200
  18. @@ -32,9 +32,9 @@
  19. #include <stdlib.h>
  20. #include <stdio.h>
  21. #include <string.h>
  22. -#include <err.h>
  23. #include <unistd.h>
  24. #include <fcntl.h>
  25. +#include "err.h"
  26. static off_t offtin(u_char *buf)
  27. {
  28. Index: err.h
  29. --- /dev/null 2005-08-17 09:19:51.000000000 +0200
  30. +++ err.h 2005-08-17 09:19:51.704744000 +0200
  31. @@ -0,0 +1,10 @@
  32. +#ifndef __ERR_H__
  33. +#define __ERR_H__
  34. +
  35. +#include <stdio.h>
  36. +#include <stdlib.h>
  37. +
  38. +#define err(bla, ...) { fprintf(stderr, __VA_ARGS__); fputs("\n", stderr); exit(EXIT_FAILURE); }
  39. +#define errx(bla, ...) { fprintf(stderr, __VA_ARGS__); fputs("\n", stderr); exit(EXIT_FAILURE); }
  40. +
  41. +#endif /* __ERR_H__ */