Subject: Several small fixes (#394) Index: ucb/Mail/{Makefile,def.h},usr.bin/uucp/gnsys.c,bin/ld/ld.c, 2.11BSD Description: 1) Mail fails to compile due to a redundant declaration of 'sig_t' 2) The lint flags are wrong in Mail/Makefile 3) A warning error is printed during the compilation of uucp/gnsys.c 4) ld.c had private declarations of system functions rather than using stdlib.h and unistd.h. Also the comments about the number of VM buffers was incorrect. Repeat-By: 1) cd /usr/src/ucb/Mail; make The compilation will cease when the redundant declaration of sig_t is encountered. 2) Observation. 3) cd /usr/src/usr.bin/uucp; make A warning error will be printed when gnsys.c is compiled. 4) Observation. Fix: 1) signal.h was updated in patch #387 to include a declaration for the sig_t type. Programs which had a local declaration need to be changed to only include signal.h and not declare sig_t themselves. 2) The lint flags in Mail/Makefile were changed to include 'hxa'. 3) 'calloc' is now declared to be "void" in unistd.h. There was a missing cast in uucp/gnsys.c. The SCCS ID string at the top of the file was ifdef'd out to save data space (uucico is a large program and should not be wasting space on SCCS strings). 4) ld.c just happened to catch my eye while I was looking for something else in the system. The change is small, simply removing local declarations and adding include statements for unistd.h and stdlib.h To install this update cut where indicated saving to a file (/tmp/394). Then: patch -p0 < /tmp/394 cd /usr/src/bin/ld make make install make clean cd /usr/src/usr.bin/uucp make make install make clean cd /usr/src/ucb/Mail make make install make clean As always this and previous updates to 2.11BSD are available via anonymous FTP to either FTP.IIPO.GTEGSC.COM or MOE.2BSD.COM in the directory /pub/2.11BSD. --------------------------cut here------------------------- *** /usr/src/ucb/Mail/def.h.old Sat Jan 27 00:56:28 1996 --- /usr/src/ucb/Mail/def.h Fri Oct 31 16:11:15 1997 *************** *** 30,36 **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)def.h 5.22.1 (2.11BSD) 1996/1/27 */ #include /* includes */ --- 30,36 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)def.h 5.22.2 (2.11BSD) 1997/10/31 */ #include /* includes */ *************** *** 40,46 **** #include #include #include "pathnames.h" - typedef int (*sig_t)(); /* * Mail -- a mail program * --- 40,45 ---- *** /usr/src/ucb/Mail/Makefile.old Tue Oct 22 20:14:19 1996 --- /usr/src/ucb/Mail/Makefile Fri Oct 31 21:15:24 1997 *************** *** 1,4 **** ! # @(#)Makefile 5.16.1 (2.11BSD) 1996/10/22 SRCS= version.c aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ getname.c head.c v7.local.c lex.c list.c main.c names.c popen.c \ --- 1,4 ---- ! # @(#)Makefile 5.16.2 (2.11BSD) 1996/10/31 SRCS= version.c aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ getname.c head.c v7.local.c lex.c list.c main.c names.c popen.c \ *************** *** 49,55 **** rm -f Mail a.out fmt x.c xs.c tags core xhead.c strings lint: ! lint $(CFLAGS) $(SRCS) fmt: fmt.o xhead.o $(CC) $(CFLAGS) -i fmt.o xhead.o -o fmt --- 49,55 ---- rm -f Mail a.out fmt x.c xs.c tags core xhead.c strings lint: ! lint -hxa $(CFLAGS) $(SRCS) fmt: fmt.o xhead.o $(CC) $(CFLAGS) -i fmt.o xhead.o -o fmt *** /usr/src/usr.bin/uucp/gnsys.c.old Mon Feb 16 16:21:45 1987 --- /usr/src/usr.bin/uucp/gnsys.c Fri Oct 31 17:35:53 1997 *************** *** 1,5 **** ! #ifndef lint ! static char sccsid[] = "@(#)gnsys.c 5.4 (Berkeley) 6/20/85"; #endif #include "uucp.h" --- 1,5 ---- ! #if !defined(lint) && defined(DOSCCS) ! static char sccsid[] = "@(#)gnsys.c 5.4.1 (2.11BSD) 1997/10/31"; #endif #include "uucp.h" *************** *** 126,132 **** if (strcmp(name, list[i]) == 0) break; if (i >= n) { ! if ((p = calloc((unsigned)strlen(name) + 1, sizeof (char))) == NULL) return n; strcpy(p, name); --- 126,132 ---- if (strcmp(name, list[i]) == 0) break; if (i >= n) { ! if ((p = (char *)calloc(strlen(name) + 1, sizeof (char))) == NULL) return n; strcpy(p, name); *** /usr/src/bin/ld/ld.c.old Mon May 8 21:14:50 1995 --- /usr/src/bin/ld/ld.c Fri Oct 31 22:56:47 1997 *************** *** 1,8 **** #if defined(DOSCCS) && !defined(lint) ! static char *sccsid = "@(#)ld.c 4.4 1995/05/08"; #endif /* * 4.4 1995/05/08 - sms * Add -q to turn off undefined symbol reporting. Used when building * networking kernels and many undefineds are expected but look worrisome. --- 1,12 ---- #if defined(DOSCCS) && !defined(lint) ! static char *sccsid = "@(#)ld.c 4.5 1997/10/31"; #endif /* + * 4.5 1997/10/31 - sms + * Minor cleanup. Use unistd.h and stdlib.h instead of local definitions. + * Correct comment about number of VM pages. + * * 4.4 1995/05/08 - sms * Add -q to turn off undefined symbol reporting. Used when building * networking kernels and many undefineds are expected but look worrisome. *************** *** 53,58 **** --- 57,64 ---- #include #include #include + #include + #include #include "archive.h" /* *************** *** 104,115 **** * Do not set the following too high (normally set in the Makefile) or * 'ld' will not be able to allocate room (currently 8kb) for string * tables and performance will suffer badly. It is possible that this ! * could be raised a bit higher but 18 gives 'adequate' performance on * all but the largest ('tcsh' for example) programs, and even there it's * not _too_ bad. */ #ifndef NUM_VM_PAGES ! #define NUM_VM_PAGES 18 #endif #define NNAMESIZE 32 /* Maximum symbol string length */ #define SYMSPERSEG (BYTESPERSEG / sizeof (SYMBOL)) --- 110,121 ---- * Do not set the following too high (normally set in the Makefile) or * 'ld' will not be able to allocate room (currently 8kb) for string * tables and performance will suffer badly. It is possible that this ! * could be raised a bit higher but 20 gives 'adequate' performance on * all but the largest ('tcsh' for example) programs, and even there it's * not _too_ bad. */ #ifndef NUM_VM_PAGES ! #define NUM_VM_PAGES 20 #endif #define NNAMESIZE 32 /* Maximum symbol string length */ #define SYMSPERSEG (BYTESPERSEG / sizeof (SYMBOL)) *************** *** 284,291 **** int delexit(); VADDR sym2va(); off_t skip(); - extern long lseek(), atol(), strtol(); - extern char *mktemp(); main(argc, argv) char **argv; --- 290,295 ---- *** /VERSION.old Sat Oct 18 16:22:44 1997 --- /VERSION Fri Oct 31 16:06:14 1997 *************** *** 1,5 **** ! Current Patch Level: 393 ! Date: October 18, 1997 2.11 BSD ============ --- 1,5 ---- ! Current Patch Level: 394 ! Date: October 31, 1997 2.11 BSD ============