From unknown Mon Jun 23 11:25:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13981 <13981@debbugs.gnu.org> To: bug#13981 <13981@debbugs.gnu.org> Subject: Status: 24.3.50; Incorrect declaration of image_background Reply-To: bug#13981 <13981@debbugs.gnu.org> Date: Mon, 23 Jun 2025 18:25:08 +0000 retitle 13981 24.3.50; Incorrect declaration of image_background reassign 13981 emacs submitter 13981 Ken Brown severity 13981 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 16 21:10:03 2013 Received: (at submit) by debbugs.gnu.org; 17 Mar 2013 01:10:03 +0000 Received: from localhost ([127.0.0.1]:58239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UH26t-0006Ql-4n for submit@debbugs.gnu.org; Sat, 16 Mar 2013 21:10:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56962) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UH26p-0006QD-Qb for submit@debbugs.gnu.org; Sat, 16 Mar 2013 21:10:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UH25J-0006sO-RE for submit@debbugs.gnu.org; Sat, 16 Mar 2013 21:08:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-105.0 required=5.0 tests=BAYES_00, DATE_IN_PAST_03_06, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:33388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH25J-0006sK-OI for submit@debbugs.gnu.org; Sat, 16 Mar 2013 21:08:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH25I-00026v-KO for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 21:08:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UH25H-0006rr-Du for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 21:08:24 -0400 Received: from limestone8.mail.cornell.edu ([128.253.83.168]:38530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH25H-0006rb-99 for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2013 21:08:23 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limestone8.mail.cornell.edu (8.14.4/8.14.4) with ESMTP id r2H18IXV014422 for ; Sat, 16 Mar 2013 21:08:18 -0400 (EDT) Received: from [192.168.1.6] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r2H18H9M014585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 16 Mar 2013 21:08:18 -0400 Message-ID: <5144CE95.6010600@cornell.edu> Date: Sat, 16 Mar 2013 15:57:09 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Incorrect declaration of image_background Content-Type: multipart/mixed; boundary="------------000701070100080404000402" X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) This is a multi-part message in MIME format. --------------000701070100080404000402 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit image_background() is declared in dispextern.h with a return type of `unsigned long'. But it is defined in image.c with a return type of RGB_PIXEL_COLOR, where the latter is a platform-dependent macro defined in image.c. By luck, this doesn't cause any problems in the currently-supported platforms. But it will cause problems in the cygw32 build on 64-bit Cygwin (which is currently under development). The attached patch fixes this by moving the definition of RGB_PIXEL_COLOR to dispextern.h and changing the return type in the declaration. OK to apply? Ken --------------000701070100080404000402 Content-Type: text/plain; charset=windows-1252; name="image_background.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="image_background.patch" === modified file 'src/dispextern.h' --- src/dispextern.h 2013-01-02 16:13:04 +0000 +++ src/dispextern.h 2013-03-16 19:55:58 +0000 @@ -3160,6 +3160,14 @@ #ifdef HAVE_WINDOW_SYSTEM +#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) +#define RGB_PIXEL_COLOR unsigned long +#endif + +#ifdef HAVE_NTGUI +#define RGB_PIXEL_COLOR COLORREF +#endif + extern int x_bitmap_height (struct frame *, ptrdiff_t); extern int x_bitmap_width (struct frame *, ptrdiff_t); extern ptrdiff_t x_bitmap_pixmap (struct frame *, ptrdiff_t); @@ -3186,7 +3194,7 @@ void prepare_image_for_display (struct frame *, struct image *); ptrdiff_t lookup_image (struct frame *, Lisp_Object); -unsigned long image_background (struct image *, struct frame *, +RGB_PIXEL_COLOR image_background (struct image *, struct frame *, XImagePtr_or_DC ximg); int image_background_transparent (struct image *, struct frame *, XImagePtr_or_DC mask); === modified file 'src/image.c' --- src/image.c 2013-03-04 17:35:29 +0000 +++ src/image.c 2013-03-16 19:17:45 +0000 @@ -68,8 +68,6 @@ #define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y) #define NO_PIXMAP None -#define RGB_PIXEL_COLOR unsigned long - #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 #endif /* HAVE_X_WINDOWS */ @@ -88,8 +86,6 @@ #define GET_PIXEL(ximg, x, y) GetPixel (ximg, x, y) #define NO_PIXMAP 0 -#define RGB_PIXEL_COLOR COLORREF - #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 @@ -110,7 +106,6 @@ #define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y) #define NO_PIXMAP 0 -#define RGB_PIXEL_COLOR unsigned long #define ZPixmap 0 #define PIX_MASK_RETAIN 0 --------------000701070100080404000402-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 16 23:50:10 2013 Received: (at 13981) by debbugs.gnu.org; 17 Mar 2013 03:50:10 +0000 Received: from localhost ([127.0.0.1]:58324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UH4bq-0002Mj-Av for submit@debbugs.gnu.org; Sat, 16 Mar 2013 23:50:10 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:45522) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UH4bn-0002M7-Qy for 13981@debbugs.gnu.org; Sat, 16 Mar 2013 23:50:09 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MJS00F00CZVL700@a-mtaout20.012.net.il> for 13981@debbugs.gnu.org; Sun, 17 Mar 2013 05:47:59 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJS00FFQD7Z96C0@a-mtaout20.012.net.il>; Sun, 17 Mar 2013 05:47:59 +0200 (IST) Date: Sun, 17 Mar 2013 05:48:02 +0200 From: Eli Zaretskii Subject: Re: bug#13981: 24.3.50; Incorrect declaration of image_background In-reply-to: <5144CE95.6010600@cornell.edu> X-012-Sender: halo1@inter.net.il To: Ken Brown Message-id: <83ip4q3cwd.fsf@gnu.org> References: <5144CE95.6010600@cornell.edu> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 13981 Cc: 13981@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.2 (/) > Date: Sat, 16 Mar 2013 15:57:09 -0400 > From: Ken Brown > > image_background() is declared in dispextern.h with a return type of > `unsigned long'. But it is defined in image.c with a return type of > RGB_PIXEL_COLOR, where the latter is a platform-dependent macro defined > in image.c. > > By luck, this doesn't cause any problems in the currently-supported > platforms. But it will cause problems in the cygw32 build on 64-bit > Cygwin (which is currently under development). The attached patch fixes > this by moving the definition of RGB_PIXEL_COLOR to dispextern.h and > changing the return type in the declaration. > > OK to apply? Yes, but please move the definition of RGB_PIXEL_COLOR so it is just before the prototype of image_background, since that is its only user. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 10:38:12 2013 Received: (at 13981-done) by debbugs.gnu.org; 17 Mar 2013 14:38:12 +0000 Received: from localhost ([127.0.0.1]:59981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHEix-0001Ts-Ut for submit@debbugs.gnu.org; Sun, 17 Mar 2013 10:38:12 -0400 Received: from limestone8.mail.cornell.edu ([128.253.83.168]:52392) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHEiu-0001Ta-MS for 13981-done@debbugs.gnu.org; Sun, 17 Mar 2013 10:38:10 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limestone8.mail.cornell.edu (8.14.4/8.14.4) with ESMTP id r2HEaYJ8028600; Sun, 17 Mar 2013 10:36:34 -0400 (EDT) Received: from [192.168.1.6] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r2HEaXUw009190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 17 Mar 2013 10:36:33 -0400 Message-ID: <5145D4E9.1020406@cornell.edu> Date: Sun, 17 Mar 2013 10:36:25 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#13981: 24.3.50; Incorrect declaration of image_background References: <5144CE95.6010600@cornell.edu> <83ip4q3cwd.fsf@gnu.org> In-Reply-To: <83ip4q3cwd.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 13981-done Cc: 13981-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.7 (------) On 3/16/2013 11:48 PM, Eli Zaretskii wrote: >> Date: Sat, 16 Mar 2013 15:57:09 -0400 >> From: Ken Brown >> OK to apply? > > Yes, but please move the definition of RGB_PIXEL_COLOR so it is just > before the prototype of image_background, since that is its only user. Done as bzr revision 112064. I'm closing the bug. Ken From unknown Mon Jun 23 11:25:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 15 Apr 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator