diff options
| author | Paul Eggert | 2017-07-13 19:24:06 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-07-13 19:24:49 -0700 |
| commit | 3128d5d10e702ccb0732d947370e539a54046fc9 (patch) | |
| tree | a2a3c95dcf1263d55ca63fb4675b43286a8351de /lib | |
| parent | ab87dbad1d26fba4e33b62b4b5a840be77ae9aa5 (diff) | |
| download | emacs-3128d5d10e702ccb0732d947370e539a54046fc9.tar.gz emacs-3128d5d10e702ccb0732d947370e539a54046fc9.zip | |
Merge from gnulib
This incorporates:
2017-07-13 Improve cross-compilation guesses for native Windows
2017-07-11 More systematic m4 quoting and indentation
2017-07-10 Make sure $host and $host_os are defined when used
2017-07-03 stdioext: Port to OpenVMS
2017-06-24 xalloc-oversized: port to icc
* doc/misc/texinfo.tex, lib/fpending.c, lib/stdio-impl.h:
* lib/xalloc-oversized.h, m4/dirfd.m4, m4/gettimeofday.m4:
* m4/lstat.m4, m4/mktime.m4, m4/pselect.m4, m4/putenv.m4:
* m4/stdint.m4, m4/strtoimax.m4, m4/utimes.m4:
Copy from Gnulib.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fpending.c | 4 | ||||
| -rw-r--r-- | lib/stdio-impl.h | 2 | ||||
| -rw-r--r-- | lib/xalloc-oversized.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/fpending.c b/lib/fpending.c index c9b77866858..02602a1c27f 100644 --- a/lib/fpending.c +++ b/lib/fpending.c | |||
| @@ -41,7 +41,7 @@ __fpending (FILE *fp) | |||
| 41 | return fp->_ptr - fp->_buffer; | 41 | return fp->_ptr - fp->_buffer; |
| 42 | #elif defined __minix /* Minix */ | 42 | #elif defined __minix /* Minix */ |
| 43 | return fp_->_ptr - fp_->_buf; | 43 | return fp_->_ptr - fp_->_buf; |
| 44 | #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ | 44 | #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ |
| 45 | return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0); | 45 | return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0); |
| 46 | #elif defined __UCLIBC__ /* uClibc */ | 46 | #elif defined __UCLIBC__ /* uClibc */ |
| 47 | return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0); | 47 | return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0); |
| @@ -51,8 +51,6 @@ __fpending (FILE *fp) | |||
| 51 | return fp->__bufp - fp->__buffer; | 51 | return fp->__bufp - fp->__buffer; |
| 52 | #elif defined EPLAN9 /* Plan9 */ | 52 | #elif defined EPLAN9 /* Plan9 */ |
| 53 | return fp->wp - fp->buf; | 53 | return fp->wp - fp->buf; |
| 54 | #elif defined __VMS /* VMS */ | ||
| 55 | return (*fp)->_ptr - (*fp)->_base; | ||
| 56 | #else | 54 | #else |
| 57 | # error "Please port gnulib fpending.c to your platform!" | 55 | # error "Please port gnulib fpending.c to your platform!" |
| 58 | return 1; | 56 | return 1; |
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 75a945eb724..d5b5943fd7c 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h | |||
| @@ -99,6 +99,8 @@ | |||
| 99 | int _file; \ | 99 | int _file; \ |
| 100 | unsigned int _flag; \ | 100 | unsigned int _flag; \ |
| 101 | } *) fp) | 101 | } *) fp) |
| 102 | # elif defined __VMS /* OpenVMS */ | ||
| 103 | # define fp_ ((struct _iobuf *) fp) | ||
| 102 | # else | 104 | # else |
| 103 | # define fp_ fp | 105 | # define fp_ fp |
| 104 | # endif | 106 | # endif |
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index ff0efc6ba40..2e09bab0be2 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h | |||
| @@ -44,7 +44,7 @@ typedef size_t __xalloc_count_type; | |||
| 44 | #if 7 <= __GNUC__ | 44 | #if 7 <= __GNUC__ |
| 45 | # define xalloc_oversized(n, s) \ | 45 | # define xalloc_oversized(n, s) \ |
| 46 | __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) | 46 | __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) |
| 47 | #elif 5 <= __GNUC__ && !__STRICT_ANSI__ | 47 | #elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ |
| 48 | # define xalloc_oversized(n, s) \ | 48 | # define xalloc_oversized(n, s) \ |
| 49 | (__builtin_constant_p (n) && __builtin_constant_p (s) \ | 49 | (__builtin_constant_p (n) && __builtin_constant_p (s) \ |
| 50 | ? __xalloc_oversized (n, s) \ | 50 | ? __xalloc_oversized (n, s) \ |