From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johannes Weiner Newsgroups: gmane.emacs.devel Subject: Re: Please install and ack Date: Wed, 12 Sep 2007 12:08:11 +0200 Message-ID: <20070912100811.GC12104@saeurebad.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0484365704==" X-Trace: sea.gmane.org 1189591715 686 80.91.229.12 (12 Sep 2007 10:08:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2007 10:08:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 12 12:08:33 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IVP8z-0003Cv-Dd for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2007 12:08:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVP8z-0006x5-48 for ged-emacs-devel@m.gmane.org; Wed, 12 Sep 2007 06:08:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVP8u-0006sc-1S for emacs-devel@gnu.org; Wed, 12 Sep 2007 06:08:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVP8t-0006qZ-6Z for emacs-devel@gnu.org; Wed, 12 Sep 2007 06:08:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVP8s-0006q9-5w for emacs-devel@gnu.org; Wed, 12 Sep 2007 06:08:18 -0400 Original-Received: from saeurebad.de ([85.214.36.134]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVP8p-0003rP-5n; Wed, 12 Sep 2007 06:08:15 -0400 Original-Received: by saeurebad.de (Postfix, from userid 1000) id 42C962F0156; Wed, 12 Sep 2007 12:08:11 +0200 (CEST) Mail-Followup-To: Richard Stallman , emacs-devel@gnu.org In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-11) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:78655 Archived-At: --===============0484365704== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BI5RvnYi6R4T2M87" Content-Disposition: inline --BI5RvnYi6R4T2M87 Content-Type: multipart/mixed; boundary="Clx92ZfkiYIKRjnr" Content-Disposition: inline --Clx92ZfkiYIKRjnr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Sep 11, 2007 at 04:31:51PM -0400, Richard Stallman wrote: > --- src/xterm.c.orig 2007-05-25 12:43:35.000000000 +0000 > +++ src/xterm.c 2007-08-31 03:43:32.106444418 +0000 > =20 > +#ifndef abs > #define abs(x) ((x) < 0 ? -(x) : (x)) > +#endif > =20 > --- src/keyboard.c.orig 2007-04-01 21:54:54.000000000 +0000 > +++ src/keyboard.c 2007-08-31 03:43:32.291971223 +0000 > =20 > +#ifndef abs > #define abs(x) ((x) >=3D 0 ? (x) : -(x)) > +#endif > =20 > --- src/xfaces.c.orig 2007-02-14 15:47:51.000000000 +0000 > +++ src/xfaces.c 2007-09-06 18:17:56.728517424 +0000 > > - > +#ifndef abs > #define abs(X) ((X) < 0 ? -(X) : (X)) > - > +#endif Wouldn't it be better to centralize that macro? It's trivial, sure. But repetition is not beautiful. I have a patch attached, but I'm not quite su= re if config.h is the place to do this.. Hannes --Clx92ZfkiYIKRjnr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: inline; filename="emacs-centralize-abs-definition.patch" Content-Transfer-Encoding: quoted-printable Index: configure.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/configure.in,v retrieving revision 1.474 diff -u -r1.474 configure.in --- configure.in 12 Sep 2007 07:03:30 -0000 1.474 +++ configure.in 12 Sep 2007 09:58:33 -0000 @@ -2729,7 +2729,7 @@ AC_CHECK_FUNCS(gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ -strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ +strerror fpathconf select mktime euidaccess getpagesize tzset setlocale ab= s \ utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ @@ -3375,6 +3375,10 @@ #define BCMP memcmp #endif =20 +#ifndef HAVE_ABS +#define abs(x) ((x) < 0 ? -(x) : (x)) +#endif + #endif /* EMACS_CONFIG_H */ =20 /* Index: src/keyboard.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/keyboard.c,v retrieving revision 1.913 diff -u -r1.913 keyboard.c --- src/keyboard.c 12 Sep 2007 07:19:55 -0000 1.913 +++ src/keyboard.c 12 Sep 2007 09:58:47 -0000 @@ -108,8 +108,6 @@ #define KBD_BUFFER_SIZE 4096 #endif /* No X-windows */ =20 -#define abs(x) ((x) >=3D 0 ? (x) : -(x)) - /* Following definition copied from eval.c */ =20 struct backtrace Index: src/sound.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/sound.c,v retrieving revision 1.45 diff -u -r1.45 sound.c --- src/sound.c 26 Jul 2007 05:27:56 -0000 1.45 +++ src/sound.c 12 Sep 2007 09:58:48 -0000 @@ -96,9 +96,6 @@ =20 #endif /* WINDOWSNT */ =20 -/* BEGIN: Common Definitions */ -#define abs(X) ((X) < 0 ? -(X) : (X)) - /* Symbols. */ =20 extern Lisp_Object QCfile, QCdata; Index: src/w32term.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/w32term.c,v retrieving revision 1.265 diff -u -r1.265 w32term.c --- src/w32term.c 4 Sep 2007 21:38:40 -0000 1.265 +++ src/w32term.c 12 Sep 2007 09:58:48 -0000 @@ -58,8 +58,6 @@ #include "composite.h" #include "coding.h" =20 -#define abs(x) ((x) < 0 ? -(x) : (x)) - =0C /* Fringe bitmaps. */ =20 Index: src/xfaces.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/xfaces.c,v retrieving revision 1.364 diff -u -r1.364 xfaces.c --- src/xfaces.c 29 Aug 2007 21:46:05 -0000 1.364 +++ src/xfaces.c 12 Sep 2007 09:58:48 -0000 @@ -267,8 +267,6 @@ =20 #include =20 -#define abs(X) ((X) < 0 ? -(X) : (X)) - /* Number of pt per inch (from the TeXbook). */ =20 #define PT_PER_INCH 72.27 Index: src/xterm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/xterm.c,v retrieving revision 1.956 diff -u -r1.956 xterm.c --- src/xterm.c 10 Sep 2007 21:25:32 -0000 1.956 +++ src/xterm.c 12 Sep 2007 09:58:48 -0000 @@ -154,8 +154,6 @@ #endif #endif =20 -#define abs(x) ((x) < 0 ? -(x) : (x)) - /* Default to using XIM if available. */ #ifdef USE_XIM int use_xim =3D 1; --Clx92ZfkiYIKRjnr-- --BI5RvnYi6R4T2M87 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG57qLdvEGNHGk3KARAo13AJ4hXPuSnSxtGkCcPf6hpLXFGOiC3wCcCBQZ 50iHMMuQjQACYlzs9yxMvCQ= =qR4x -----END PGP SIGNATURE----- --BI5RvnYi6R4T2M87-- --===============0484365704== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============0484365704==--