From owner-cvs-all Wed Oct 9 1:30:29 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C3BA37B401; Wed, 9 Oct 2002 01:30:27 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id E920043E65; Wed, 9 Oct 2002 01:30:23 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id A07882A88D; Wed, 9 Oct 2002 01:30:22 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/gen Makefile.inc errlst.c errno.c In-Reply-To: <200210090804.g9984P12041412@freefall.freebsd.org> Date: Wed, 09 Oct 2002 01:30:22 -0700 From: Peter Wemm Message-Id: <20021009083022.A07882A88D@canning.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Wemm wrote: > peter 2002/10/09 01:04:24 PDT > > Modified files: > lib/libc/gen Makefile.inc errlst.c > Added files: > lib/libc/gen errno.c > Log: > Drop almost 3k from /bin/sync by moving errno to a seperate file > to avoid all syscalls pulling in sys_errlst[]. > > Noted by: bde And the following change to src/bin/sync.c gets the installed binary from 13K down to ~2.3K (854 bytes text, 36 bytes data, 36 bytes bss on i386, but this should world on all our platforms still). I can't believe I did this... Index: sync.c =================================================================== RCS file: /home/ncvs/src/bin/sync/sync.c,v retrieving revision 1.13 diff -u -r1.13 sync.c --- sync.c 2002/06/30 05:15:05 1.13 +++ sync.c 2002/10/09 08:26:22 @@ -54,3 +54,15 @@ sync(); exit(0); } + +void +exit(int ret) +{ + _exit(ret); +} + +int +atexit(void (*func)(void)) +{ + return (0); +} Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message