GNU bug report logs -
#1043
PENDING_OUTPUT_COUNT discussion
Previous Next
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.
Full log
View this message in rfc822 format
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. */
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.