aboutsummaryrefslogtreecommitdiff
path: root/src/compat.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-03-18 22:25:27 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-03-18 22:25:27 -0400
commitccaeb7092b5ad40b1b3833c987ba3ec4d47f0bb8 (patch)
treeae167772a9a2343aa77bf8944b56abe853f6a2ec /src/compat.c
parent3731bb4679ee8716d4f579d5744c36a2d1b4a257 (diff)
downloadspmc-ccaeb7092b5ad40b1b3833c987ba3ec4d47f0bb8.tar.gz
Refactor project: build/install libspm[_static.a].so to make unit testing possible
Diffstat (limited to 'src/compat.c')
-rw-r--r--src/compat.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/compat.c b/src/compat.c
deleted file mode 100644
index 5fd2cc4..0000000
--- a/src/compat.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "config.h"
-
-#ifndef HAVE_STRSEP
-#include <string.h>
-// credit: Dan Cross via https://unixpapa.com/incnote/string.html
-char *strsep(char **sp, char *sep)
-{
- char *p, *s;
- if (sp == NULL || *sp == NULL || **sp == '\0') return(NULL);
- s = *sp;
- p = s + strcspn(s, sep);
- if (*p != '\0') *p++ = '\0';
- *sp = p;
- return(s);
-}
-#endif
-
-#ifndef HAVE_REALLOCARRAY
-#include <stdlib.h>
-void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) {
- return realloc(__ptr, __nmemb * __size);
-}
-#endif