GNU bug report logs - #1043
PENDING_OUTPUT_COUNT discussion

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Sun, 28 Sep 2008 07:25:03 UTC

Severity: normal

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1043 in the body.
You can then email your comments to 1043 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: emacs does not compile when using uClibc
Date: Sun, 28 Sep 2008 00:15:42 -0700 (PDT)
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 <malloc.h>
 #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 <stddef.h>
 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 <http
 /* new C libio names */
 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
   ((FILE)->_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.  */





Tags added: patch Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 30 Sep 2008 07:15:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #12 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 1043 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1043: emacs does not compile when using uClibc
Date: Wed, 01 Oct 2008 09:27:06 -0400
> 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





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #22 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Richard M. Stallman" <rms <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, 1043 <at> debbugs.gnu.org
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1043: emacs does not compile when using uClibc
Date: Wed, 01 Oct 2008 21:01:54 -0400
    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!






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #32 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: rms <at> gnu.org
Cc: 1043 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1043: emacs does not compile when using uClibc
Date: Thu, 02 Oct 2008 08:42:44 -0400
>     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





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #42 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Richard M. Stallman" <rms <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 1043 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1043: emacs does not compile when using uClibc
Date: Fri, 03 Oct 2008 00:17:19 -0400
    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.







Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1043; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Changed bug title to `PENDING_OUTPUT_COUNT discussion' from `emacs does not compile when using uClibc'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 08 Oct 2008 08:10:07 GMT) Full text and rfc822 format available.

Tags set to: notabug Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 08 Oct 2008 08:10:07 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to Dan Nicolaescu <dann <at> ics.uci.edu> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sun, 12 Oct 2008 23:35:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 10 Nov 2008 15:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.