all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* config related patch (and how to start handling Debian patches)
@ 2003-02-07 23:06 Rob Browning
  2003-02-09 12:40 ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Browning @ 2003-02-07 23:06 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-02-15 18:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-07 23:06 config related patch (and how to start handling Debian patches) Rob Browning
2003-02-09 12:40 ` 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.