summaryrefslogtreecommitdiff
path: root/common/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/compat.h')
-rw-r--r--common/compat.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/common/compat.h b/common/compat.h
index a6a02af..bd933cb 100644
--- a/common/compat.h
+++ b/common/compat.h
@@ -72,12 +72,6 @@
const char * getprogname (void);
#endif
-#ifndef HAVE_BASENAME
-
-char * basename (const char *name);
-
-#endif /* HAVE_BASENAME */
-
#ifndef HAVE_MKSTEMP
int mkstemp (char *template);
@@ -220,6 +214,17 @@ void p11_mmap_close (p11_mmap *map);
#endif /* OS_UNIX */
+/*
+ * The semantics of both POSIX basename() and GNU asename() are so crappy that
+ * we just don't even bother. And what's worse is how it completely changes
+ * behavior if _GNU_SOURCE is defined. Nasty stuff.
+ */
+char * p11_basename (const char *name);
+
+/* ----------------------------------------------------------------------------
+ * MORE COMPAT
+ */
+
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif /* HAVE_ERRNO_H */