aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-10-02 02:58:01 +0000
committerDan Nicolaescu2008-10-02 02:58:01 +0000
commit65f451d083e946cdee6278ebe8ffbc4705d9328b (patch)
treeaffefec9dc375675e65a72761b618878c6c473eb
parent97f6e1ad87856872182b653d96c555cabee39cdc (diff)
downloademacs-65f451d083e946cdee6278ebe8ffbc4705d9328b.tar.gz
emacs-65f451d083e946cdee6278ebe8ffbc4705d9328b.zip
* gmalloc.c (__sbrk): Also define for uClibc.
* s/gnu-linux.h (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Add definition for uClibc.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/gmalloc.c10
-rw-r--r--src/s/gnu-linux.h8
3 files changed, 18 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index eb667c7a0ce..c4adaab887f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12008-10-02 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * gmalloc.c (__sbrk): Also define for uClibc.
4
5 * s/gnu-linux.h (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Add definition
6 for uClibc.
7
12008-10-01 Adrian Robert <Adrian.B.Robert@gmail.com> 82008-10-01 Adrian Robert <Adrian.B.Robert@gmail.com>
2 9
3 * nsfont.m (nsfont_spec_to_traits): Use UnXX masks only for non-normal 10 * nsfont.m (nsfont_spec_to_traits): Use UnXX masks only for non-normal
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 1cf9a8ee9b5..f1be37ba348 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -1706,17 +1706,17 @@ MA 02110-1301, USA. */
1706#include <malloc.h> 1706#include <malloc.h>
1707#endif 1707#endif
1708 1708
1709#ifndef __GNU_LIBRARY__ 1709/* uClibc defines __GNU_LIBRARY__, but it is not completely
1710 compatible. */
1711#if !defined(__GNU_LIBRARY__) || defined(__UCLIBC__)
1710#define __sbrk sbrk 1712#define __sbrk sbrk
1711#endif 1713#else /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */
1712
1713#ifdef __GNU_LIBRARY__
1714/* It is best not to declare this and cast its result on foreign operating 1714/* It is best not to declare this and cast its result on foreign operating
1715 systems with potentially hostile include files. */ 1715 systems with potentially hostile include files. */
1716 1716
1717#include <stddef.h> 1717#include <stddef.h>
1718extern __ptr_t __sbrk PP ((ptrdiff_t increment)); 1718extern __ptr_t __sbrk PP ((ptrdiff_t increment));
1719#endif 1719#endif /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */
1720 1720
1721#ifndef NULL 1721#ifndef NULL
1722#define NULL 0 1722#define NULL 0
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index bd0acd36302..2e28b81f7d0 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -156,11 +156,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
156/* new C libio names */ 156/* new C libio names */
157#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ 157#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
158 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) 158 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
159#else /* !_IO_STDIO_H */ 159#elif defined (__UCLIBC__)
160/* using the uClibc library */
161#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
162 ((FILE)->__bufpos - (FILE)->__bufstart)
163#else /* !_IO_STDIO_H && ! __UCLIBC__ */
160/* old C++ iostream names */ 164/* old C++ iostream names */
161#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ 165#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
162 ((FILE)->_pptr - (FILE)->_pbase) 166 ((FILE)->_pptr - (FILE)->_pbase)
163#endif /* !_IO_STDIO_H */ 167#endif /* !_IO_STDIO_H && ! __UCLIBC__ */
164#endif /* emacs */ 168#endif /* emacs */
165 169
166/* Ask GCC where to find libgcc.a. */ 170/* Ask GCC where to find libgcc.a. */