* bug#1043: emacs does not compile when using uClibc
@ 2008-09-28 7:15 Dan Nicolaescu
2008-10-01 13:27 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Dan Nicolaescu @ 2008-09-28 7:15 UTC (permalink / raw
To: bug-gnu-emacs
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. */
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#1043: emacs does not compile when using uClibc
2008-09-28 7:15 bug#1043: emacs does not compile when using uClibc Dan Nicolaescu
@ 2008-10-01 13:27 ` Stefan Monnier
2008-10-02 1:01 ` Richard M. Stallman
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-10-01 13:27 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: 1043, bug-gnu-emacs
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#1043: emacs does not compile when using uClibc
2008-10-01 13:27 ` Stefan Monnier
@ 2008-10-02 1:01 ` Richard M. Stallman
2008-10-02 12:42 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Richard M. Stallman @ 2008-10-02 1:01 UTC (permalink / raw
To: Stefan Monnier, 1043; +Cc: bug-gnu-emacs
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!
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#1043: emacs does not compile when using uClibc
2008-10-02 1:01 ` Richard M. Stallman
@ 2008-10-02 12:42 ` Stefan Monnier
2008-10-03 4:17 ` Richard M. Stallman
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-10-02 12:42 UTC (permalink / raw
To: rms; +Cc: 1043, bug-gnu-emacs
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#1043: emacs does not compile when using uClibc
2008-10-02 12:42 ` Stefan Monnier
@ 2008-10-03 4:17 ` Richard M. Stallman
0 siblings, 0 replies; 5+ messages in thread
From: Richard M. Stallman @ 2008-10-03 4:17 UTC (permalink / raw
To: Stefan Monnier; +Cc: 1043, bug-gnu-emacs
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-03 4:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 7:15 bug#1043: emacs does not compile when using uClibc Dan Nicolaescu
2008-10-01 13:27 ` Stefan Monnier
2008-10-02 1:01 ` Richard M. Stallman
2008-10-02 12:42 ` Stefan Monnier
2008-10-03 4:17 ` Richard M. Stallman
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.