summaryrefslogtreecommitdiff
path: root/app-text/pinfo/files/pinfo-0.6.10-libc-basename.patch
blob: 6e9d4954792a7403f01c4633fee00a48d4fa15dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
do not redefine the basename that the C library provides

--- a/src/filehandling_functions.c
+++ b/src/filehandling_functions.c
@@ -31,7 +31,6 @@ typedef struct
 }
 Suffixes;
 
-char * basename(char *filename);
 
 
 /******************************************************************************
@@ -713,20 +712,6 @@ opendirfile(int number)
 	return NULL;
 }
 
-char *
-basename(char *filename)
-{
-	int len = strlen(filename);
-	char *a = filename + len;
-	while (a > filename)
-	{
-		a--;
-		if (*a == '/')
-			return a + 1;
-	}
-	return filename;		/* when it was a basename */
-}
-
 /*
  * Note: openinfo is a function for reading info files, and putting
  * uncompressed content into a temporary filename.  For a flexibility, there