summaryrefslogtreecommitdiff
path: root/lang/cint/patches/patch-ag
blob: df0b91c9453c6784632ef215adf04fb257fb8ba9 (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
$NetBSD: patch-ag,v 1.1 2008/09/05 05:27:31 dholland Exp $

--- glob/tilde.c.orig	2005-05-06 04:48:48.000000000 -0400
+++ glob/tilde.c	2008-09-05 00:23:17.000000000 -0400
@@ -27,6 +27,8 @@
 #  endif
 #endif
 
+#include <string.h>
+#include <stdlib.h>
 #include <pwd.h>
 
 #ifndef savestring
@@ -41,7 +43,7 @@ typedef int Function ();
 #if defined (TEST)
 static char *xmalloc (), *xrealloc ();
 #else
-extern char *malloc (), *xrealloc ();
+extern char *xmalloc (), *xrealloc ();
 #endif /* TEST */
 
 /* The default value of tilde_additional_prefixes.  This is set to
@@ -60,7 +62,8 @@ static char *default_suffixes[] =
    standard meaning for expanding a tilde fails.  The function is called
    with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
    which is the expansion, or a NULL pointer if there is no expansion. */
-Function *tilde_expansion_failure_hook = (Function *)NULL;
+/*Function *tilde_expansion_failure_hook = (Function *)NULL;*/
+char *(*tilde_expansion_failure_hook)(char *) = NULL;
 
 /* When non-null, this is a NULL terminated array of strings which
    are duplicates for a tilde prefix.  Bash uses this to expand