commit - dd853333d02cc3e79a43ecd94d98ad2b251483cf
commit + 4db88d74a79c9f7a3b792d21e337d36621a2370a
blob - 0b881a3ebca5b1465af6d7f317ef8075ad1055c4
blob + a1d702831e621f5740cbf492a9a032fb1fde989a
--- diff/diff.c
+++ diff/diff.c
#include <diff/diff_main.h>
#include <diff/diff_output.h>
-#ifdef __linux__
-/* stupid shims to compile and test on linux */
-#define __dead
-
-static const char *getprogname()
-{
- return "diff";
-}
-#endif
-
__dead void usage(void);
int diffreg(char *, char *, int);
char *mmapfile(const char *, struct stat *);
blob - 395468a8c29ce7c6d5ca5283a1a1aa247acb3d87
blob + db835ae4d16c7b4d8631e5e0ac7fb837546f3e89
--- include/diff/arraylist.h
+++ include/diff/arraylist.h
#pragma once
-#ifdef __linux__
-/* stupid shims to compile and test on linux */
-#include <strings.h>
-static inline void *reallocarray(void *buf, size_t n, size_t member_size)
-{
- return realloc(buf, n * member_size);
-}
-static inline void *recallocarray(void *buf, size_t oldn, size_t n, size_t member_size)
-{
- buf = reallocarray(buf, n, member_size);
- bzero(((char*)buf) + (oldn * member_size), (n - oldn) * member_size);
- return buf;
-}
-#endif
-
-
/* Usage:
*
* ARRAYLIST(any_type_t) list;