From unknown Sat Aug 16 18:37:10 2025 X-Loop: don@donarmstrong.com Subject: bug#1043: emacs does not compile when using uClibc Reply-To: Dan Nicolaescu , 1043@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 28 Sep 2008 07:25:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1043 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122258616030312 (code B ref -1); Sun, 28 Sep 2008 07:25:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,FOURLA, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 28 Sep 2008 07:16:00 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8S7Fvnl030306 for ; Sun, 28 Sep 2008 00:15:58 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KjqVY-0002K8-Vi for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 03:15:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KjqVY-0002Jw-Fh for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 03:15:56 -0400 Received: from [199.232.76.173] (port=45521 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjqVY-0002Jt-96 for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 03:15:56 -0400 Received: from mx20.gnu.org ([199.232.41.8]:50818) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KjqVX-0002tj-PW for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 03:15:56 -0400 Received: from barrelv2.ics.uci.edu ([128.195.1.114]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KjqVW-00058X-NJ for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 03:15:55 -0400 Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m8S7Fhph016381 for ; Sun, 28 Sep 2008 00:15:47 -0700 (PDT) Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id m8S7Fg1f020280; Sun, 28 Sep 2008 00:15:42 -0700 (PDT) Date: Sun, 28 Sep 2008 00:15:42 -0700 (PDT) Message-Id: <200809280715.m8S7Fg1f020280@mothra.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs@gnu.org Lines: 61 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: m8S7Fhph016381 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.714, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FRT_BELOW2 2.15) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by mx20.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) uClibc is an alternative libc, emacs does not work on such systems at the moment. The patch bellow fixes this. Not sure if this is a bug fix, or it's adding a new feature, so just record it here in case it's the latter. Index: src/gmalloc.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/gmalloc.c,v retrieving revision 1.28 diff -u -3 -p -r1.28 gmalloc.c --- src/gmalloc.c 23 May 2008 04:39:57 -0000 1.28 +++ src/gmalloc.c 28 Sep 2008 07:08:54 -0000 @@ -1706,17 +1706,17 @@ MA 02110-1301, USA. */ #include #endif -#ifndef __GNU_LIBRARY__ +/* uClibc defines __GNU_LIBRARY__, but it is not completely + compatible. */ +#if !defined(__GNU_LIBRARY__) || defined(__UCLIBC__) #define __sbrk sbrk -#endif - -#ifdef __GNU_LIBRARY__ +#else /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */ /* It is best not to declare this and cast its result on foreign operating systems with potentially hostile include files. */ #include extern __ptr_t __sbrk PP ((ptrdiff_t increment)); -#endif +#endif /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */ #ifndef NULL #define NULL 0 Index: src/s/gnu-linux.h =================================================================== RCS file: /cvsroot/emacs/emacs/src/s/gnu-linux.h,v retrieving revision 1.113 diff -u -3 -p -r1.113 gnu-linux.h --- src/s/gnu-linux.h 2 Aug 2008 16:19:03 -0000 1.113 +++ src/s/gnu-linux.h 28 Sep 2008 07:08:54 -0000 @@ -156,11 +156,15 @@ along with GNU Emacs. If not, see _IO_write_ptr - (FILE)->_IO_write_base) -#else /* !_IO_STDIO_H */ +#elif defined (__UCLIBC__) +/* using the uClibc library */ +#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ + ((FILE)->__bufpos - (FILE)->__bufstart) +#else /* !_IO_STDIO_H && ! __UCLIBC__ */ /* old C++ iostream names */ #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ ((FILE)->_pptr - (FILE)->_pbase) -#endif /* !_IO_STDIO_H */ +#endif /* !_IO_STDIO_H && ! __UCLIBC__ */ #endif /* emacs */ /* Ask GCC where to find libgcc.a. */ From unknown Sat Aug 16 18:37:10 2025 X-Loop: don@donarmstrong.com Subject: bug#1043: emacs does not compile when using uClibc Reply-To: Stefan Monnier , 1043@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 01 Oct 2008 13:35:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1043 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122286763616107 (code B ref -1); Wed, 01 Oct 2008 13:35:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 1 Oct 2008 13:27:16 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m91DRBAf016091 for ; Wed, 1 Oct 2008 06:27:13 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl1jT-00043O-G5 for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 09:27:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl1jQ-00042B-FT for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 09:27:10 -0400 Received: from [199.232.76.173] (port=43610 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl1jQ-000427-5a for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 09:27:08 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:51195 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kl1jP-0005u2-Qe for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 09:27:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArEEAOUX40jO+KDT/2dsb2JhbACBZrwmgWqBBoIe X-IronPort-AV: E=Sophos;i="4.33,343,1220241600"; d="scan'208";a="27799319" Received: from 206-248-160-211.dsl.teksavvy.com (HELO pastel.home) ([206.248.160.211]) by ironport2-out.teksavvy.com with ESMTP; 01 Oct 2008 09:27:06 -0400 Received: by pastel.home (Postfix, from userid 20848) id 8EBDD8040; Wed, 1 Oct 2008 09:27:06 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 1043@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: <200809280715.m8S7Fg1f020280@mothra.ics.uci.edu> Date: Wed, 01 Oct 2008 09:27:06 -0400 In-Reply-To: <200809280715.m8S7Fg1f020280@mothra.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 28 Sep 2008 00:15:42 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-CrossAssassin-Score: 2 > uClibc is an alternative libc, emacs does not work on such systems at > the moment. The patch bellow fixes this. Not sure if this is a bug > fix, or it's adding a new feature, so just record it here in case it's > the latter. It looks safe enough. But let's just note for the future that PENDING_OUTPUT_COUNT should die. Stefan From unknown Sat Aug 16 18:37:10 2025 X-Loop: don@donarmstrong.com Subject: bug#1043: emacs does not compile when using uClibc Reply-To: rms@gnu.org, 1043@debbugs.gnu.org Resent-From: "Richard M. Stallman" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 02 Oct 2008 01:10:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1043 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122290945527816 (code B ref -1); Thu, 02 Oct 2008 01:10:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Oct 2008 01:04:15 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9214C3H027806 for ; Wed, 1 Oct 2008 18:04:13 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlCbz-0005O7-Vo for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:04:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlCby-0005NO-BI for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:04:11 -0400 Received: from [199.232.76.173] (port=51069 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlCby-0005NI-5j for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:04:10 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:34834) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KlCbx-0007GA-Hb for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 21:04:09 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KlCZm-0002QZ-AD; Wed, 01 Oct 2008 21:01:54 -0400 Content-Type: text/plain; charset=ISO-8859-15 From: "Richard M. Stallman" To: Stefan Monnier , 1043@debbugs.gnu.org CC: bug-gnu-emacs@gnu.org In-reply-to: (message from Stefan Monnier on Wed, 01 Oct 2008 09:27:06 -0400) References: <200809280715.m8S7Fg1f020280@mothra.ics.uci.edu> Message-Id: Date: Wed, 01 Oct 2008 21:01:54 -0400 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 It looks safe enough. But let's just note for the future that PENDING_OUTPUT_COUNT should die. That feature used to be important for making output preemption really work on remote logins. Please do not get rid of it! From unknown Sat Aug 16 18:37:10 2025 X-Loop: don@donarmstrong.com Subject: bug#1043: emacs does not compile when using uClibc Reply-To: Stefan Monnier , 1043@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 02 Oct 2008 12:50:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1043 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12229513758749 (code B ref -1); Thu, 02 Oct 2008 12:50:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Oct 2008 12:42:55 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m92CgpL4008741 for ; Thu, 2 Oct 2008 05:42:53 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlNW7-0000P0-D4 for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2008 08:42:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlNW6-0000Oo-QL for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2008 08:42:50 -0400 Received: from [199.232.76.173] (port=37562 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlNW6-0000Ol-Ls for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2008 08:42:50 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:50926) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KlNW4-00032f-Lb; Thu, 02 Oct 2008 08:42:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAP5d5EjO+KVj/2dsb2JhbACBZrsXgWqBBg X-IronPort-AV: E=Sophos;i="4.33,351,1220241600"; d="scan'208";a="27858102" Received: from 206-248-165-99.dsl.teksavvy.com (HELO pastel.home) ([206.248.165.99]) by ironport2-out.teksavvy.com with ESMTP; 02 Oct 2008 08:42:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id 26A1580D0; Thu, 2 Oct 2008 08:42:44 -0400 (EDT) From: Stefan Monnier To: rms@gnu.org Cc: 1043@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: <200809280715.m8S7Fg1f020280@mothra.ics.uci.edu> Date: Thu, 02 Oct 2008 08:42:44 -0400 In-Reply-To: (Richard M. Stallman's message of "Wed, 01 Oct 2008 21:01:54 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > It looks safe enough. But let's just note for the future that > PENDING_OUTPUT_COUNT should die. > That feature used to be important for making output preemption really > work on remote logins. Please do not get rid of it! I do not understand: 1- PENDING_OUTPUT_COUNT is not a feature, but an internal implementation trick. Not sure what is the corresponding feature. 2- Why/how is it related to remote logins? 3- Why/how is it related to output preemption? Stefan From unknown Sat Aug 16 18:37:10 2025 X-Loop: don@donarmstrong.com Subject: bug#1043: emacs does not compile when using uClibc Reply-To: rms@gnu.org, 1043@debbugs.gnu.org Resent-From: "Richard M. Stallman" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 03 Oct 2008 04:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1043 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122300758013768 (code B ref -1); Fri, 03 Oct 2008 04:25:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 3 Oct 2008 04:19:40 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m934Jb8K013757 for ; Thu, 2 Oct 2008 21:19:38 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Klc8e-0007Dw-SW for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 00:19:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Klc8e-0007D1-6w for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 00:19:36 -0400 Received: from [199.232.76.173] (port=49629 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Klc8d-0007Cr-VR for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 00:19:35 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:56102) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Klc8d-0001XQ-Mr for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2008 00:19:35 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Klc6R-0000nq-Ad; Fri, 03 Oct 2008 00:17:19 -0400 Content-Type: text/plain; charset=ISO-8859-15 From: "Richard M. Stallman" To: Stefan Monnier CC: 1043@debbugs.gnu.org, bug-gnu-emacs@gnu.org In-reply-to: (message from Stefan Monnier on Thu, 02 Oct 2008 08:42:44 -0400) References: <200809280715.m8S7Fg1f020280@mothra.ics.uci.edu> Message-Id: Date: Fri, 03 Oct 2008 00:17:19 -0400 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 1- PENDING_OUTPUT_COUNT is not a feature, but an internal implementation trick. Not sure what is the corresponding feature. If you type a character during redisplay, it preempts output. But all the characters that are buffered have to come out on the terminal before it really succeeds in preempting. The feature which PENDING_OUTPUT_COUNT is used for is to limit the amount of output that gets buffered, so that preemption is snappy.