aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-03-18 14:11:41 +0100
committerFabian Groffen <grobian@gentoo.org>2019-03-18 14:13:19 +0100
commita221d981b4349b07d8b3869cb8ad2bb06d353a7a (patch)
tree1b3d480c25302c9d49d85884e292c10434421a99 /libq/basename.c
parentq.c: move run_applet_l to its only consumer qmerge.c (diff)
downloadportage-utils-a221d981b4349b07d8b3869cb8ad2bb06d353a7a.tar.gz
portage-utils-a221d981b4349b07d8b3869cb8ad2bb06d353a7a.tar.bz2
portage-utils-a221d981b4349b07d8b3869cb8ad2bb06d353a7a.zip
libq: standardise build
Compile each C-file by itself, producing an object which is linked into a convenience archive. The q program then links against that archive. Switch to autotools-based build for everyone. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'libq/basename.c')
-rw-r--r--libq/basename.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libq/basename.c b/libq/basename.c
index 4836fd7..7e480b1 100644
--- a/libq/basename.c
+++ b/libq/basename.c
@@ -5,13 +5,13 @@
* Copyright 2010-2014 Mike Frysinger - <vapier@gentoo.org>
*/
+#include <string.h>
+
+#include "basename.h"
+
/* our own basename which does not modify its input */
-static const char *_basename(const char *filename)
+const char *_basename(const char *filename)
{
const char *p = strrchr(filename, '/');
return p ? p + 1 : filename;
}
-
-/* Avoid issues with clobbering C library def */
-#undef basename
-#define basename(x) _basename(x)