aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2021-05-05 23:14:13 -0400
committerGitHub <noreply@github.com>2021-05-05 23:14:13 -0400
commit562258a7663a8d6447c46059743b173e19196e76 (patch)
treeedf44023e1df638c6666f5e19c213d2e08828d6a /lib
parent84f355252e33510c96adc94114ff7e63e8059d8b (diff)
downloadcleanpath-562258a7663a8d6447c46059743b173e19196e76.tar.gz
Create cmake.yml (#1)
* Create cmake.yml * Do not include limits.h for fun
Diffstat (limited to 'lib')
-rw-r--r--lib/cleanpath.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/cleanpath.c b/lib/cleanpath.c
index 55d6c22..f94c66d 100644
--- a/lib/cleanpath.c
+++ b/lib/cleanpath.c
@@ -1,19 +1,20 @@
#include <stdlib.h>
#include <string.h>
-#include <limits.h>
#include <regex.h>
-#include "cleanpath.h"
#include "config.h"
+#include "cleanpath.h"
#if OS_LINUX
-#ifdef HAVE_SYS_LIMIT_H
+#if HAVE_SYS_LIMIT_H
#include <sys/limits.h>
#endif // HAVE_SYS_LIMIT_H
-#ifdef HAVE_LINUX_LIMIT_H
+#if HAVE_LINUX_LIMIT_H
#include <linux/limits.h>
#endif // HAVE_LINUX_LIMIT_H
-#endif // OS_LINUX
+#else
+#include <limits.h>
+#endif
/**
* Split path into parts by sep