From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.emacs.devel Subject: config related patch (and how to start handling Debian patches) Date: Fri, 07 Feb 2003 17:06:28 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <874r7f4rnv.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044659568 6444 80.91.224.249 (7 Feb 2003 23:12:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2003 23:12:48 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18hHfr-0001fo-00 for ; Sat, 08 Feb 2003 00:12:47 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18hHpb-0001vX-00 for ; Sat, 08 Feb 2003 00:22:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hHdl-0000Hk-07 for emacs-devel@quimby.gnus.org; Fri, 07 Feb 2003 18:10:37 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18hHbn-00088E-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 18:08:35 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18hHao-0007Gk-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 18:07:35 -0500 Original-Received: from dsl093-098-016.wdc1.dsl.speakeasy.net ([66.93.98.16] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hHZm-0006lW-00 for emacs-devel@gnu.org; Fri, 07 Feb 2003 18:06:30 -0500 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 7BCFD13A48 for ; Fri, 7 Feb 2003 17:06:28 -0600 (CST) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 619E5B591B; Fri, 7 Feb 2003 17:06:28 -0600 (CST) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11492 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11492 I'm not sure how you'd like to handle patches from the Debian packages (including the mailspool/movemail one Dave and Francesco are interested in), but I've just finished breaking up the Debian changes into separate patches. Hopefully this will make it easier to deal with them independently, and to keep track of ownership. For anything I wrote there should be no copyright issues since my paperwork is on file, and I currently don't have an employer (anyone looking for help? :>). For now I'll start with a few miscellaneous, but config related bits, but feel free to ask me to handle these some other way, to rewrite them, etc. Time permitting, I'm happy to oblige. With respect to the bzero change below, I didn't write that one, and it predates my ownership of the Emacs packages, but I believe it's short enough that it may not fall under the assignment requirements. With respect to the HAVE_STDLIB_H changes, those will only be appropriate for universal inclusion if stdlib.h is guaranteed to have malloc and realloc. I'm not positive about that on non GNU/Linux platforms. "NEWS" entries for changes: ** Emacs uses memset, memcmp, and mmove rather than deprecated functions. File: 500-bzero-and-have-stdlib.diff Status: sent-upstream, pending #defines have been added to arrange for Emacs to use memset, memcmp, and memmove instead of bzero, bcmp, and bcopy. ** HAVE_STDLIB_H checks have been added in various places. File: 500-bzero-and-have-stdlib.diff Author: rlb Status: sent-upstream, pending Primarily in lib-src. And the patch (also appears to apply against 21.2.95 cleanly): --- emacs21-21.2.orig/src/config.in +++ emacs21-21.2/src/config.in @@ -531,6 +538,10 @@ #endif #ifdef HAVE_STDLIB_H #include +/* Don't use deprecated functions. */ +#define bzero(data, size) memset(data, '\0', size) +#define bcmp memcmp +#define bcopy(a,b,c) memmove(b,a,c) #endif #endif --- emacs21-21.2.orig/lib-src/yow.c +++ emacs21-21.2/lib-src/yow.c @@ -10,6 +10,7 @@ * With dynamic memory allocation. */ +#include "config.h" #include #include #include <../src/epaths.h> /* For PATH_DATA. */ @@ -33,7 +34,9 @@ &res;}) #endif +#ifndef HAVE_STDLIB_H /* config.h includes stdlib. */ char *malloc(), *realloc(); +#endif void yow(); void setup_yow(); --- emacs21-21.2.orig/lib-src/cvtmail.c +++ emacs21-21.2/lib-src/cvtmail.c @@ -33,11 +33,14 @@ * Author: Larry Kolodney, 1985 */ - +#include "config.h" #include +#ifndef HAVE_STDLIB_H /* config.h includes stdlib. */ char *malloc (); char *realloc (); +#endif + char *getenv (); char *xmalloc (); -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4