aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sudo/files/autofoo.patch
blob: 516e209e239df70aca2f2b7362c05fac98d98a2c (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

Index: sudo-1.6.8p6/configure.in
===================================================================
--- sudo-1.6.8p6.orig/configure.in	2004-11-25 12:31:20.000000000 -0500
+++ sudo-1.6.8p6/configure.in	2005-01-21 19:09:27.248233336 -0500
@@ -1700,12 +1700,14 @@
 if test -z "$BROKEN_GETCWD"; then
     AC_REPLACE_FUNCS(getcwd)
 fi
-AC_CHECK_FUNCS(lockf flock, [break])
-AC_CHECK_FUNCS(waitpid wait3, [break])
-AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname) [break]])
-AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch), -), AC_LIBOBJ(lsearch))])
-AC_CHECK_FUNCS(utimes, [AC_CHECK_FUNCS(futimes futimesat, [break])], [AC_CHECK_FUNCS(futime) AC_LIBOBJ(utimes)])
-SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH), AC_LIBOBJ(fnmatch))
+AC_CHECK_FUNCS(lockf flock)
+AC_CHECK_FUNCS(waitpid wait3)
+AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname)])
+
+AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, [AC_CHECK_HEADER(search.h, [AC_DEFINE(HAVE_LSEARCH) LIBS="$LIBS -lcompat"], [AC_LIBOBJ([lsearch])])], [AC_LIBOBJ([lsearch])])])
+
+AC_CHECK_FUNCS(utime, [SUDO_FUNC_UTIME_POSIX], [AC_LIBOBJ([utime])])
+SUDO_FUNC_FNMATCH([AC_DEFINE([HAVE_FNMATCH], [1], [Define if you have the 'fnmatch' function.])], [AC_LIBOBJ([fnmatch])])
 SUDO_FUNC_ISBLANK
 AC_REPLACE_FUNCS(strerror strcasecmp sigaction strlcpy strlcat closefrom)
 AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1])
Index: sudo-1.6.8p6/aclocal.m4
===================================================================
--- sudo-1.6.8p6.orig/aclocal.m4	2004-09-07 13:14:51.000000000 -0400
+++ sudo-1.6.8p6/aclocal.m4	2005-01-21 19:17:00.029400136 -0500
@@ -9,7 +9,7 @@
 dnl
 dnl check for sendmail
 dnl
-AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(for sendmail)
+AC_DEFUN([SUDO_PROG_SENDMAIL], [AC_MSG_CHECKING(for sendmail)
 if test -f "/usr/sbin/sendmail"; then
     AC_MSG_RESULT(/usr/sbin/sendmail)
     SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/sbin/sendmail")
@@ -36,7 +36,7 @@
 dnl
 dnl check for vi
 dnl
-AC_DEFUN(SUDO_PROG_VI, [AC_MSG_CHECKING(for vi)
+AC_DEFUN([SUDO_PROG_VI], [AC_MSG_CHECKING(for vi)
 if test -f "/usr/bin/vi"; then
     AC_MSG_RESULT(/usr/bin/vi)
     SUDO_DEFINE(_PATH_VI, "/usr/bin/vi")
@@ -60,7 +60,7 @@
 dnl
 dnl check for mv
 dnl
-AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(for mv)
+AC_DEFUN([SUDO_PROG_MV], [AC_MSG_CHECKING(for mv)
 if test -f "/usr/bin/mv"; then
     AC_MSG_RESULT(/usr/bin/mv)
     SUDO_DEFINE(_PATH_MV, "/usr/bin/mv")
@@ -81,7 +81,7 @@
 dnl
 dnl check for bourne shell
 dnl
-AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING(for bourne shell)
+AC_DEFUN([SUDO_PROG_BSHELL], [AC_MSG_CHECKING(for bourne shell)
 if test -f "/bin/sh"; then
     AC_MSG_RESULT(/bin/sh)
     SUDO_DEFINE(_PATH_BSHELL, "/bin/sh")
@@ -114,7 +114,7 @@
 dnl
 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
 dnl
-AC_DEFUN(SUDO_LOGFILE, [AC_MSG_CHECKING(for log file location)
+AC_DEFUN([SUDO_LOGFILE], [AC_MSG_CHECKING(for log file location)
 if test -n "$with_logpath"; then
     AC_MSG_RESULT($with_logpath)
     SUDO_DEFINE_UNQUOTED(_PATH_SUDO_LOGFILE, "$with_logpath")
@@ -135,7 +135,7 @@
 dnl
 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
 dnl
-AC_DEFUN(SUDO_TIMEDIR, [AC_MSG_CHECKING(for timestamp file location)
+AC_DEFUN([SUDO_TIMEDIR], [AC_MSG_CHECKING(for timestamp file location)
 if test -n "$with_timedir"; then
     AC_MSG_RESULT($with_timedir)
     SUDO_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$with_timedir")
@@ -158,7 +158,7 @@
 dnl
 dnl check for fullly working void
 dnl
-AC_DEFUN(SUDO_FULL_VOID, [AC_MSG_CHECKING(for full void implementation)
+AC_DEFUN([SUDO_FULL_VOID], [AC_MSG_CHECKING(for full void implementation)
 AC_TRY_COMPILE(, [void *foo;
 foo = (void *)0; (void *)"test";], AC_DEFINE(VOID, void, [Define to "void" if your compiler supports void pointers, else use "char"].)
 AC_MSG_RESULT(yes), AC_DEFINE(VOID, char)
@@ -168,7 +168,7 @@
 dnl SUDO_CHECK_TYPE(TYPE, DEFAULT)
 dnl XXX - should require the check for unistd.h...
 dnl
-AC_DEFUN(SUDO_CHECK_TYPE,
+AC_DEFUN([SUDO_CHECK_TYPE],
 [AC_REQUIRE([AC_HEADER_STDC])dnl
 AC_MSG_CHECKING(for $1)
 AC_CACHE_VAL(sudo_cv_type_$1,
@@ -189,31 +189,31 @@
 dnl
 dnl Check for size_t declation
 dnl
-AC_DEFUN(SUDO_TYPE_SIZE_T,
+AC_DEFUN([SUDO_TYPE_SIZE_T],
 [SUDO_CHECK_TYPE(size_t, int)])
 
 dnl
 dnl Check for ssize_t declation
 dnl
-AC_DEFUN(SUDO_TYPE_SSIZE_T,
+AC_DEFUN([SUDO_TYPE_SSIZE_T],
 [SUDO_CHECK_TYPE(ssize_t, int)])
 
 dnl
 dnl Check for dev_t declation
 dnl
-AC_DEFUN(SUDO_TYPE_DEV_T,
+AC_DEFUN([SUDO_TYPE_DEV_T],
 [SUDO_CHECK_TYPE(dev_t, int)])
 
 dnl
 dnl Check for ino_t declation
 dnl
-AC_DEFUN(SUDO_TYPE_INO_T,
+AC_DEFUN([SUDO_TYPE_INO_T],
 [SUDO_CHECK_TYPE(ino_t, unsigned int)])
 
 dnl
 dnl check for working fnmatch(3)
 dnl
-AC_DEFUN(SUDO_FUNC_FNMATCH,
+AC_DEFUN([SUDO_FUNC_FNMATCH],
 [AC_MSG_CHECKING(for working fnmatch with FNM_CASEFOLD)
 AC_CACHE_VAL(sudo_cv_func_fnmatch,
 [rm -f conftestdata; > conftestdata
@@ -224,9 +224,9 @@
 rm -f core core.* *.core])dnl
 AC_MSG_RESULT($sudo_cv_func_fnmatch)
 if test $sudo_cv_func_fnmatch = yes; then
-  [$1]
+  $1
 else
-  [$2]
+  $2
 fi
 ])
 
@@ -246,7 +246,7 @@
 dnl
 dnl check for sa_len field in struct sockaddr
 dnl
-AC_DEFUN(SUDO_SOCK_SA_LEN,
+AC_DEFUN([SUDO_SOCK_SA_LEN],
 [AC_MSG_CHECKING(for sa_len field in struct sockaddr)
 AC_CACHE_VAL(sudo_cv_sock_sa_len,
 [AC_TRY_RUN([#include <sys/types.h>
@@ -269,7 +269,7 @@
 dnl we can't really trust UID_MAX or MAXUID since they may exist
 dnl only for backwards compatibility.
 dnl
-AC_DEFUN(SUDO_UID_T_LEN,
+AC_DEFUN([SUDO_UID_T_LEN],
 [AC_REQUIRE([AC_TYPE_UID_T])
 AC_MSG_CHECKING(max length of uid_t)
 AC_CACHE_VAL(sudo_cv_uid_t_len,
@@ -303,15 +303,21 @@
 dnl check for "long long"
 dnl XXX hard to cache since it includes 2 tests
 dnl
-AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support)
-AC_TRY_LINK(, [long long foo = 1000; foo /= 10;], AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.])
-[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).]))]
-AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])
+
+AC_DEFUN([SUDO_LONG_LONG], [AC_MSG_CHECKING(for long long support)
+AC_LINK_IFELSE([long long foo = 1000; foo /= 10;],
+	AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.])
+	AC_CHECK_SIZEOF([long])
+	AC_CHECK_SIZEOF([long long])
+	if x"$ac_cv_sizeof_long" = x"$ac_cv_sizeof_long_long"; then
+	    AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).])
+	fi
+, AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])
 
 dnl
 dnl append a libpath to an LDFLAGS style variable
 dnl
-AC_DEFUN(SUDO_APPEND_LIBPATH, [
+AC_DEFUN([SUDO_APPEND_LIBPATH], [
     if test X"$with_rpath" = X"yes"; then
 	$1="${$1} -L$2 -R$2"
     else