aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/yale-tftpd/files/patch-aa
blob: 8df2cba15fc86107a406c73e175f53540c756c72 (plain) (blame)
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
*** Makefile	Tue Oct  4 22:47:03 1994
--- Makefile	Thu Oct 27 14:46:17 1994
***************
*** 4,13 ****
  PROG=	tftpd
  MAN8=	tftpd.8
  
! ETCDIR?=${DESTDIR}/etc
! BINDIR?=${DESTDIR}/usr/libexec
  
! CFLAGS+=-DCONFIGFILE='"${ETCDIR}/tftpd.conf"'
  
  classes/libclasses.a:
  	(cd classes ; make)
--- 4,14 ----
  PROG=	tftpd
  MAN8=	tftpd.8
  
! ETCDIR=${DESTDIR}/usr/local/etc
! BINDIR=${DESTDIR}/usr/local/libexec
! MANDIR=${DESTDIR}/usr/local/man/man
  
! CFLAGS+=-DCONFIGFILE='"${ETCDIR}/tftpd.conf"' -DHAVE_STRERROR
  
  classes/libclasses.a:
  	(cd classes ; make)
*** classes/Makefile	Tue Oct  4 22:33:02 1994
--- classes/Makefile	Thu Oct 27 14:43:57 1994
***************
*** 6,9 ****
--- 6,12 ----
  NOPIC=	true
  NOPROFILE=true
  
+ install:
+ 	@echo not installing library
+ 
  .include <bsd.lib.mk>
*** tftpd.c	Tue Oct  4 22:20:49 1994
--- tftpd.c	Thu Oct 27 14:36:32 1994
***************
*** 500,509 ****
  	/* Rules 6&7:
  	 */
  	if (stat(filename, &stbuf) < 0) {
- 		extern char* sys_errlist[];
  		if (tftpDebugLevel > 1)
  			syslog(LOG_DEBUG, "stat '%s' fails: %s",
! 				filename, sys_errlist[errno]);
  		return (errno == ENOENT ? ENOTFOUND : EACCESS);
  	}
  
--- 500,508 ----
  	/* Rules 6&7:
  	 */
  	if (stat(filename, &stbuf) < 0) {
  		if (tftpDebugLevel > 1)
  			syslog(LOG_DEBUG, "stat '%s' fails: %s",
! 				filename, strerror(errno));
  		return (errno == ENOENT ? ENOTFOUND : EACCESS);
  	}
  
***************
*** 763,774 ****
  		syslog(LOG_ERR, "nak: %m\n");
  }
  
  /* Here if you need it */
  char* strerror(n)
  int	n;
  {
! 	extern char* sys_errlist[];
! 	extern int errno, sys_nerr;
! 
  	return n > sys_nerr ? "unknown error" : sys_errlist[n];
  }
--- 762,773 ----
  		syslog(LOG_ERR, "nak: %m\n");
  }
  
+ #ifndef	HAVE_STRERROR
  /* Here if you need it */
  char* strerror(n)
  int	n;
  {
! 	extern int sys_nerr;
  	return n > sys_nerr ? "unknown error" : sys_errlist[n];
  }
+ #endif
*** tftpyale.c	Tue Oct  4 22:20:49 1994
--- tftpyale.c	Thu Oct 27 14:37:03 1994
***************
*** 232,238 ****
  		if ((configf = fopen (fileName, "r")) == NULL) {
  			syslog (LOG_ERR,
  				"Cannot open configFile '%s'; reason = %s",
! 				fileName, sys_errlist[errno]);
  			return 0;
  		}
  	}
--- 232,238 ----
  		if ((configf = fopen (fileName, "r")) == NULL) {
  			syslog (LOG_ERR,
  				"Cannot open configFile '%s'; reason = %s",
! 				fileName, strerror(errno));
  			return 0;
  		}
  	}
***************
*** 278,284 ****
  				if (tftpDebugLevel > 0) {
  					syslog (LOG_DEBUG,
  						"chdir fails; '%s'",
! 						sys_errlist[errno]);
  				}
  			}
  			else
--- 278,284 ----
  				if (tftpDebugLevel > 0) {
  					syslog (LOG_DEBUG,
  						"chdir fails; '%s'",
! 						strerror(errno));
  				}
  			}
  			else
***************
*** 290,296 ****
  			if (cargc == 2) {
  				if (access(cargv[1], 0) != 0)
  					syslog(LOG_DEBUG, "directory '%s': %s",
! 						cargv[1], sys_errlist[errno]);
  				else
  					tftpRootDirectory = newString(cargv[1]);
  			}
--- 290,296 ----
  			if (cargc == 2) {
  				if (access(cargv[1], 0) != 0)
  					syslog(LOG_DEBUG, "directory '%s': %s",
! 						cargv[1], strerror(errno));
  				else
  					tftpRootDirectory = newString(cargv[1]);
  			}
*** tftpyale.h	Tue Oct  4 22:18:20 1994
--- tftpyale.h	Thu Oct 27 14:38:14 1994
***************
*** 22,33 ****
  #ifdef __STDC__
  	extern int	errno;
  	extern void*	malloc(unsigned);
- 	extern char*	sys_errlist[];
  	extern char*	strchr(const char*, int);
  #else
  	extern int	errno;
  	extern char*	malloc();
- 	extern char*	sys_errlist[];
  	extern char*	index();
  # define strchar(S,C)	index(S,C)
  #endif
--- 22,38 ----
  #ifdef __STDC__
  	extern int	errno;
  	extern void*	malloc(unsigned);
  	extern char*	strchr(const char*, int);
+ # ifndef	HAVE_STRERROR
+ 	extern char*	strerror(int);
+ # endif
  #else
  	extern int	errno;
  	extern char*	malloc();
  	extern char*	index();
+ # ifndef	HAVE_STRERROR
+ 	extern char*	strerror();
+ # endif
  # define strchar(S,C)	index(S,C)
  #endif
+