unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
Subject: config related patch (and how to start handling Debian patches)
Date: Fri, 07 Feb 2003 17:06:28 -0600	[thread overview]
Message-ID: <874r7f4rnv.fsf@raven.i.defaultvalue.org> (raw)


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 <stdlib.h>
+/* 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 <stdio.h>
 #include <ctype.h>
 #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 <stdio.h>
 
+#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

             reply	other threads:[~2003-02-07 23:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-07 23:06 Rob Browning [this message]
2003-02-09 12:40 ` config related patch (and how to start handling Debian patches) Richard Stallman
2003-02-09 17:54   ` Rob Browning
2003-02-10 22:38     ` Richard Stallman
2003-02-15  5:11       ` Rob Browning
2003-02-15 18:01         ` Benjamin Riefenstahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874r7f4rnv.fsf@raven.i.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).