diff options
| author | Glenn Morris | 2012-07-10 23:52:48 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-07-10 23:52:48 -0700 |
| commit | c8add24e86d499000f0998558d635fffa1f3857c (patch) | |
| tree | 4e66354f1cfce36f68f679c3b72dffbb73436852 | |
| parent | b41253a389afdffde3d2551e4c165f0ebbafdf89 (diff) | |
| download | emacs-c8add24e86d499000f0998558d635fffa1f3857c.tar.gz emacs-c8add24e86d499000f0998558d635fffa1f3857c.zip | |
Move GNU_LIBRARY_PENDING_OUTPUT_COUNT from src/s to configure
* configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): Move here from src/s.
* src/s/gnu.h, src/s/gnu-linux.h:
Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | configure.ac | 70 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/s/gnu-linux.h | 18 | ||||
| -rw-r--r-- | src/s/gnu.h | 10 |
5 files changed, 72 insertions, 36 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-07-11 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): | ||
| 4 | Move here from src/s. | ||
| 5 | |||
| 1 | 2012-07-11 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2012-07-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Assume rename, strerror. | 8 | Assume rename, strerror. |
diff --git a/configure.ac b/configure.ac index ddb25534257..23ddaa7e9f5 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -3163,19 +3163,14 @@ dnl Used in sound.c | |||
| 3163 | AC_DEFINE_UNQUOTED(DEFAULT_SOUND_DEVICE, "$sound_device", | 3163 | AC_DEFINE_UNQUOTED(DEFAULT_SOUND_DEVICE, "$sound_device", |
| 3164 | [Name of the default sound device.]) | 3164 | [Name of the default sound device.]) |
| 3165 | 3165 | ||
| 3166 | dnl Used in vm-limit.c | ||
| 3167 | AH_TEMPLATE(DATA_START, [Address of the start of the data segment.]) | ||
| 3168 | dnl Used in lisp.h, emacs.c, mem-limits.h | ||
| 3169 | dnl NEWS.18 describes this as "a number which contains | ||
| 3170 | dnl the high bits to be inclusive or'ed with pointers that are unpacked." | ||
| 3171 | AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers | ||
| 3172 | stored in a Lisp_Object.]) | ||
| 3173 | dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT. | ||
| 3174 | |||
| 3175 | dnl Used in dispnew.c | 3166 | dnl Used in dispnew.c |
| 3176 | AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the | 3167 | AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the |
| 3177 | buffer of a stdio stream.]) | 3168 | buffer of a stdio stream.]) |
| 3178 | 3169 | ||
| 3170 | dnl FIXME just PENDING_OUTPUT_COUNT should suffice. | ||
| 3171 | AH_TEMPLATE(GNU_LIBRARY_PENDING_OUTPUT_COUNT, [Value of | ||
| 3172 | PENDING_OUTPUT_COUNT if using the GNU C library.]) | ||
| 3173 | |||
| 3179 | case $opsys in | 3174 | case $opsys in |
| 3180 | cygwin | darwin | freebsd | netbsd | openbsd ) | 3175 | cygwin | darwin | freebsd | netbsd | openbsd ) |
| 3181 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_p - (FILE)->_bf._base)]) | 3176 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_p - (FILE)->_bf._base)]) |
| @@ -3185,6 +3180,63 @@ case $opsys in | |||
| 3185 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__ptr - (FILE)->__base)]) | 3180 | AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__ptr - (FILE)->__base)]) |
| 3186 | ;; | 3181 | ;; |
| 3187 | 3182 | ||
| 3183 | gnu | gnu-linux | gnu-kfreebsd ) | ||
| 3184 | AC_MSG_CHECKING([for style of pending output formalism]) | ||
| 3185 | dnl In autoconf 2.67 (?) and later, we could use a single test | ||
| 3186 | dnl since the preprocessed output is accessible in "conftest.i". | ||
| 3187 | AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ | ||
| 3188 | #include <stdio.h> | ||
| 3189 | #if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM) | ||
| 3190 | # error "stdio definitions not found" | ||
| 3191 | #endif | ||
| 3192 | ]], [[]])], emacs_pending_output=new, emacs_pending_output=unknown) | ||
| 3193 | |||
| 3194 | if test $emacs_pending_output = unknown; then | ||
| 3195 | case $opsys in | ||
| 3196 | gnu-linux | gnu-kfreebsd) | ||
| 3197 | AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ | ||
| 3198 | #include <stdio.h> | ||
| 3199 | #ifndef __UCLIBC__ | ||
| 3200 | # error "not using uclibc" | ||
| 3201 | #endif | ||
| 3202 | ]], [[]])], emacs_pending_output=uclibc, emacs_pending_output=old) | ||
| 3203 | ;; | ||
| 3204 | esac | ||
| 3205 | fi | ||
| 3206 | |||
| 3207 | AC_MSG_RESULT([$emacs_pending_output]) | ||
| 3208 | |||
| 3209 | case $emacs_pending_output in | ||
| 3210 | new) | ||
| 3211 | dnl New C libio names. | ||
| 3212 | AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE), | ||
| 3213 | [((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)]) | ||
| 3214 | ;; | ||
| 3215 | uclibc) | ||
| 3216 | dnl Using the uClibc library. | ||
| 3217 | AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE), | ||
| 3218 | [((FILE)->__bufpos - (FILE)->__bufstart)]) | ||
| 3219 | ;; | ||
| 3220 | old) | ||
| 3221 | dnl Old C++ iostream names. | ||
| 3222 | AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE), | ||
| 3223 | [((FILE)->_pptr - (FILE)->_pbase)]) | ||
| 3224 | ;; | ||
| 3225 | esac | ||
| 3226 | ;; | ||
| 3227 | esac | ||
| 3228 | |||
| 3229 | |||
| 3230 | dnl Used in vm-limit.c | ||
| 3231 | AH_TEMPLATE(DATA_START, [Address of the start of the data segment.]) | ||
| 3232 | dnl Used in lisp.h, emacs.c, mem-limits.h | ||
| 3233 | dnl NEWS.18 describes this as "a number which contains | ||
| 3234 | dnl the high bits to be inclusive or'ed with pointers that are unpacked." | ||
| 3235 | AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers | ||
| 3236 | stored in a Lisp_Object.]) | ||
| 3237 | dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT. | ||
| 3238 | |||
| 3239 | case $opsys in | ||
| 3188 | gnu) | 3240 | gnu) |
| 3189 | dnl libc defines data_start. | 3241 | dnl libc defines data_start. |
| 3190 | AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })]) | 3242 | AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })]) |
diff --git a/src/ChangeLog b/src/ChangeLog index 64a7989a70f..045a3d374b8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-07-11 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * s/gnu.h, s/gnu-linux.h: | ||
| 4 | Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure. | ||
| 5 | |||
| 1 | 2012-07-11 John Wiegley <johnw@newartisans.com> | 6 | 2012-07-11 John Wiegley <johnw@newartisans.com> |
| 2 | 7 | ||
| 3 | * alloc.c (mark_memory): Guard the "no_address_safety_analysis" | 8 | * alloc.c (mark_memory): Guard the "no_address_safety_analysis" |
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 6f45ee00b78..9f8a994bb7e 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -92,25 +92,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 92 | your system and must be used only through an encapsulation | 92 | your system and must be used only through an encapsulation |
| 93 | (Which you should place, by convention, in sysdep.c). */ | 93 | (Which you should place, by convention, in sysdep.c). */ |
| 94 | 94 | ||
| 95 | /* This is needed for dispnew.c:update_frame. */ | ||
| 96 | #ifdef emacs | 95 | #ifdef emacs |
| 97 | #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ | ||
| 98 | #if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM) | ||
| 99 | /* New C libio names. */ | ||
| 100 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 101 | ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) | ||
| 102 | #elif defined (__UCLIBC__) | ||
| 103 | /* Using the uClibc library. */ | ||
| 104 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 105 | ((FILE)->__bufpos - (FILE)->__bufstart) | ||
| 106 | #else /* !_IO_STDIO_H && ! __UCLIBC__ */ | ||
| 107 | /* Old C++ iostream names. */ | ||
| 108 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 109 | ((FILE)->_pptr - (FILE)->_pbase) | ||
| 110 | #endif /* !_IO_STDIO_H && ! __UCLIBC__ */ | ||
| 111 | |||
| 112 | #define INTERRUPT_INPUT | 96 | #define INTERRUPT_INPUT |
| 113 | #endif /* emacs */ | 97 | #endif |
| 114 | 98 | ||
| 115 | #define POSIX /* affects getpagesize.h and systty.h */ | 99 | #define POSIX /* affects getpagesize.h and systty.h */ |
| 116 | 100 | ||
diff --git a/src/s/gnu.h b/src/s/gnu.h index bac233266c8..9ec75081ca1 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h | |||
| @@ -20,13 +20,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | /* Get most of the stuff from bsd-common */ | 21 | /* Get most of the stuff from bsd-common */ |
| 22 | #include "bsd-common.h" | 22 | #include "bsd-common.h" |
| 23 | |||
| 24 | /* It would be harmless to drop the ifdef emacs test. */ | ||
| 25 | #ifdef emacs | ||
| 26 | #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ | ||
| 27 | #if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM) | ||
| 28 | /* new C libio names */ | ||
| 29 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 30 | ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) | ||
| 31 | #endif /* !_IO_STDIO_H */ | ||
| 32 | #endif /* emacs */ | ||