diff options
| author | Paul Eggert | 2018-11-13 10:56:26 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-11-13 10:59:31 -0800 |
| commit | 7e2a1543985a770c93c9825c661bbb9b51b5e36f (patch) | |
| tree | eeeef6824307166014c2536d1e5b71e658e2180b /lib | |
| parent | 5c0d8bb95bbd5354e6b2cd2e56a91afe4e780759 (diff) | |
| download | emacs-7e2a1543985a770c93c9825c661bbb9b51b5e36f.tar.gz emacs-7e2a1543985a770c93c9825c661bbb9b51b5e36f.zip | |
Update from Gnulib
This incorporates:
2018-11-03 nstrftime: simplify test for mktime failure
2018-11-02 gnulib-common.m4: port _Noreturn to C++
2018-10-22 std-gnu11: Support Autoconf versions < 2.64
2018-10-22 Assume Autoconf >= 2.63
2018-10-16 Remove support for Ultrix
2018-10-16 getloadavg: Remove support for ConvexOS
2018-10-16 getloadavg: Remove support for Sony NEWS
2018-10-16 Remove support for Dynix/ptx
2018-10-16 fsusage: Remove support for AIX 3
2018-10-16 fsusage, stat-size, getloadavg: Remove support for AIX PS/2
2018-10-16 getloadavg: Remove support for HP-UX on m68k
2018-10-16 fsusage, mountlist: Remove support for DolphinOS
2018-10-16 getloadavg: Remove support for Alliant FX/2800
2018-10-16 getloadavg: Remove support for tek4300
2018-10-16 getloadavg: Remove support for Ardent
* build-aux/config.guess, build-aux/config.sub, lib/_Noreturn.h:
* lib/fsusage.c, lib/getgroups.c, lib/getloadavg.c:
* lib/nstrftime.c, lib/time.in.h, m4/errno_h.m4:
* m4/fsusage.m4, m4/getgroups.m4, m4/gnulib-common.m4, m4/longlong.m4:
* m4/std-gnu11.m4, m4/stdint.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate:
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/_Noreturn.h | 12 | ||||
| -rw-r--r-- | lib/fsusage.c | 54 | ||||
| -rw-r--r-- | lib/getgroups.c | 4 | ||||
| -rw-r--r-- | lib/getloadavg.c | 88 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 3 | ||||
| -rw-r--r-- | lib/nstrftime.c | 22 | ||||
| -rw-r--r-- | lib/time.in.h | 2 |
7 files changed, 21 insertions, 164 deletions
diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h index c44ad89b7c0..94fdfaf0220 100644 --- a/lib/_Noreturn.h +++ b/lib/_Noreturn.h | |||
| @@ -1,8 +1,12 @@ | |||
| 1 | #if !defined _Noreturn && __STDC_VERSION__ < 201112 | 1 | #ifndef _Noreturn |
| 2 | # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ | 2 | # if 201103 <= (defined __cplusplus ? __cplusplus : 0) |
| 3 | || 0x5110 <= __SUNPRO_C) | 3 | # define _Noreturn [[noreturn]] |
| 4 | # elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ | ||
| 5 | || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)) | ||
| 6 | /* _Noreturn works as-is. */ | ||
| 7 | # elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C | ||
| 4 | # define _Noreturn __attribute__ ((__noreturn__)) | 8 | # define _Noreturn __attribute__ ((__noreturn__)) |
| 5 | # elif 1200 <= _MSC_VER | 9 | # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) |
| 6 | # define _Noreturn __declspec (noreturn) | 10 | # define _Noreturn __declspec (noreturn) |
| 7 | # else | 11 | # else |
| 8 | # define _Noreturn | 12 | # define _Noreturn |
diff --git a/lib/fsusage.c b/lib/fsusage.c index 6920f8530a1..17daf9144a5 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c | |||
| @@ -46,9 +46,6 @@ | |||
| 46 | # if HAVE_SYS_STATFS_H | 46 | # if HAVE_SYS_STATFS_H |
| 47 | # include <sys/statfs.h> | 47 | # include <sys/statfs.h> |
| 48 | # endif | 48 | # endif |
| 49 | # if HAVE_DUSTAT_H /* AIX PS/2 */ | ||
| 50 | # include <sys/dustat.h> | ||
| 51 | # endif | ||
| 52 | #endif | 49 | #endif |
| 53 | 50 | ||
| 54 | /* Many space usage primitives use all 1 bits to denote a value that is | 51 | /* Many space usage primitives use all 1 bits to denote a value that is |
| @@ -151,21 +148,6 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) | |||
| 151 | ? PROPAGATE_ALL_ONES (fsd.f_frsize) | 148 | ? PROPAGATE_ALL_ONES (fsd.f_frsize) |
| 152 | : PROPAGATE_ALL_ONES (fsd.f_bsize)); | 149 | : PROPAGATE_ALL_ONES (fsd.f_bsize)); |
| 153 | 150 | ||
| 154 | #elif defined STAT_STATFS2_FS_DATA /* Ultrix */ | ||
| 155 | |||
| 156 | struct fs_data fsd; | ||
| 157 | |||
| 158 | if (statfs (file, &fsd) != 1) | ||
| 159 | return -1; | ||
| 160 | |||
| 161 | fsp->fsu_blocksize = 1024; | ||
| 162 | fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.fd_req.btot); | ||
| 163 | fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.fd_req.bfree); | ||
| 164 | fsp->fsu_bavail = PROPAGATE_TOP_BIT (fsd.fd_req.bfreen); | ||
| 165 | fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.fd_req.bfreen) != 0; | ||
| 166 | fsp->fsu_files = PROPAGATE_ALL_ONES (fsd.fd_req.gtot); | ||
| 167 | fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.fd_req.gfree); | ||
| 168 | |||
| 169 | #elif defined STAT_STATFS3_OSF1 /* OSF/1 */ | 151 | #elif defined STAT_STATFS3_OSF1 /* OSF/1 */ |
| 170 | 152 | ||
| 171 | struct statfs fsd; | 153 | struct statfs fsd; |
| @@ -219,12 +201,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) | |||
| 219 | 201 | ||
| 220 | fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); | 202 | fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); |
| 221 | 203 | ||
| 222 | #elif defined STAT_STATFS4 /* SVR3, Dynix, old Irix, old AIX, \ | 204 | #elif defined STAT_STATFS4 /* SVR3, old Irix */ |
| 223 | Dolphin */ | ||
| 224 | |||
| 225 | # if !_AIX && !defined _SEQUENT_ && !defined DOLPHIN | ||
| 226 | # define f_bavail f_bfree | ||
| 227 | # endif | ||
| 228 | 205 | ||
| 229 | struct statfs fsd; | 206 | struct statfs fsd; |
| 230 | 207 | ||
| @@ -234,7 +211,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) | |||
| 234 | /* Empirically, the block counts on most SVR3 and SVR3-derived | 211 | /* Empirically, the block counts on most SVR3 and SVR3-derived |
| 235 | systems seem to always be in terms of 512-byte blocks, | 212 | systems seem to always be in terms of 512-byte blocks, |
| 236 | no matter what value f_bsize has. */ | 213 | no matter what value f_bsize has. */ |
| 237 | # if _AIX || defined _CRAY | 214 | # if defined _CRAY |
| 238 | fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize); | 215 | fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize); |
| 239 | # else | 216 | # else |
| 240 | fsp->fsu_blocksize = 512; | 217 | fsp->fsu_blocksize = 512; |
| @@ -258,30 +235,3 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) | |||
| 258 | (void) disk; /* avoid argument-unused warning */ | 235 | (void) disk; /* avoid argument-unused warning */ |
| 259 | return 0; | 236 | return 0; |
| 260 | } | 237 | } |
| 261 | |||
| 262 | #if defined _AIX && defined _I386 | ||
| 263 | /* AIX PS/2 does not supply statfs. */ | ||
| 264 | |||
| 265 | int | ||
| 266 | statfs (char *file, struct statfs *fsb) | ||
| 267 | { | ||
| 268 | struct stat stats; | ||
| 269 | struct dustat fsd; | ||
| 270 | |||
| 271 | if (stat (file, &stats) != 0) | ||
| 272 | return -1; | ||
| 273 | if (dustat (stats.st_dev, 0, &fsd, sizeof (fsd))) | ||
| 274 | return -1; | ||
| 275 | fsb->f_type = 0; | ||
| 276 | fsb->f_bsize = fsd.du_bsize; | ||
| 277 | fsb->f_blocks = fsd.du_fsize - fsd.du_isize; | ||
| 278 | fsb->f_bfree = fsd.du_tfree; | ||
| 279 | fsb->f_bavail = fsd.du_tfree; | ||
| 280 | fsb->f_files = (fsd.du_isize - 2) * fsd.du_inopb; | ||
| 281 | fsb->f_ffree = fsd.du_tinode; | ||
| 282 | fsb->f_fsid.val[0] = fsd.du_site; | ||
| 283 | fsb->f_fsid.val[1] = fsd.du_pckno; | ||
| 284 | return 0; | ||
| 285 | } | ||
| 286 | |||
| 287 | #endif /* _AIX && _I386 */ | ||
diff --git a/lib/getgroups.c b/lib/getgroups.c index ec137c158a9..cd6f4d70009 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c | |||
| @@ -58,8 +58,8 @@ int posix_getgroups (int, gid_t []) __asm ("_getgroups"); | |||
| 58 | # define getgroups posix_getgroups | 58 | # define getgroups posix_getgroups |
| 59 | # endif | 59 | # endif |
| 60 | 60 | ||
| 61 | /* On at least Ultrix 4.3 and NextStep 3.2, getgroups (0, NULL) always | 61 | /* On at least NeXTstep 3.2, getgroups (0, NULL) always fails. |
| 62 | fails. On other systems, it returns the number of supplemental | 62 | On other systems, it returns the number of supplemental |
| 63 | groups for the process. This function handles that special case | 63 | groups for the process. This function handles that special case |
| 64 | and lets the system-provided function handle all others. However, | 64 | and lets the system-provided function handle all others. However, |
| 65 | it can fail with ENOMEM if memory is tight. It is unspecified | 65 | it can fail with ENOMEM if memory is tight. It is unspecified |
diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 578316e34d8..4e7eb0d2338 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c | |||
| @@ -55,16 +55,12 @@ | |||
| 55 | 55 | ||
| 56 | apollo | 56 | apollo |
| 57 | BSD Real BSD, not just BSD-like. | 57 | BSD Real BSD, not just BSD-like. |
| 58 | convex | ||
| 59 | DGUX | 58 | DGUX |
| 60 | eunice UNIX emulator under VMS. | 59 | eunice UNIX emulator under VMS. |
| 61 | hpux | 60 | hpux |
| 62 | __MSDOS__ No-op for MSDOS. | 61 | __MSDOS__ No-op for MSDOS. |
| 63 | NeXT | 62 | NeXT |
| 64 | sgi | 63 | sgi |
| 65 | sequent Sequent Dynix 3.x.x (BSD) | ||
| 66 | _SEQUENT_ Sequent DYNIX/ptx 1.x.x (SYSV) | ||
| 67 | sony_news NEWS-OS (works at least for 4.1C) | ||
| 68 | UMAX | 64 | UMAX |
| 69 | UMAX4_3 | 65 | UMAX4_3 |
| 70 | VMS | 66 | VMS |
| @@ -101,11 +97,6 @@ | |||
| 101 | # define WINDOWS32 | 97 | # define WINDOWS32 |
| 102 | # endif | 98 | # endif |
| 103 | 99 | ||
| 104 | # if !defined (BSD) && defined (ultrix) | ||
| 105 | /* Ultrix behaves like BSD on Vaxen. */ | ||
| 106 | # define BSD | ||
| 107 | # endif | ||
| 108 | |||
| 109 | # ifdef NeXT | 100 | # ifdef NeXT |
| 110 | /* NeXT in the 2.{0,1,2} releases defines BSD in <sys/param.h>, which | 101 | /* NeXT in the 2.{0,1,2} releases defines BSD in <sys/param.h>, which |
| 111 | conflicts with the definition understood in this file, that this | 102 | conflicts with the definition understood in this file, that this |
| @@ -145,10 +136,6 @@ | |||
| 145 | # define MORE_BSD | 136 | # define MORE_BSD |
| 146 | # endif | 137 | # endif |
| 147 | 138 | ||
| 148 | # if defined (ultrix) && defined (mips) | ||
| 149 | # define decstation | ||
| 150 | # endif | ||
| 151 | |||
| 152 | # if defined (__SVR4) && !defined (SVR4) | 139 | # if defined (__SVR4) && !defined (SVR4) |
| 153 | # define SVR4 | 140 | # define SVR4 |
| 154 | # endif | 141 | # endif |
| @@ -172,13 +159,6 @@ | |||
| 172 | # include <sys/table.h> | 159 | # include <sys/table.h> |
| 173 | # endif | 160 | # endif |
| 174 | 161 | ||
| 175 | /* UTek's /bin/cc on the 4300 has no architecture specific cpp define by | ||
| 176 | default, but _MACH_IND_SYS_TYPES is defined in <sys/types.h>. Combine | ||
| 177 | that with a couple of other things and we'll have a unique match. */ | ||
| 178 | # if !defined (tek4300) && defined (unix) && defined (m68k) && defined (mc68000) && defined (mc68020) && defined (_MACH_IND_SYS_TYPES) | ||
| 179 | # define tek4300 /* Define by emacs, but not by other users. */ | ||
| 180 | # endif | ||
| 181 | |||
| 182 | 162 | ||
| 183 | /* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */ | 163 | /* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */ |
| 184 | # ifndef LOAD_AVE_TYPE | 164 | # ifndef LOAD_AVE_TYPE |
| @@ -191,14 +171,6 @@ | |||
| 191 | # define LOAD_AVE_TYPE long | 171 | # define LOAD_AVE_TYPE long |
| 192 | # endif | 172 | # endif |
| 193 | 173 | ||
| 194 | # ifdef decstation | ||
| 195 | # define LOAD_AVE_TYPE long | ||
| 196 | # endif | ||
| 197 | |||
| 198 | # ifdef _SEQUENT_ | ||
| 199 | # define LOAD_AVE_TYPE long | ||
| 200 | # endif | ||
| 201 | |||
| 202 | # ifdef sgi | 174 | # ifdef sgi |
| 203 | # define LOAD_AVE_TYPE long | 175 | # define LOAD_AVE_TYPE long |
| 204 | # endif | 176 | # endif |
| @@ -207,41 +179,14 @@ | |||
| 207 | # define LOAD_AVE_TYPE long | 179 | # define LOAD_AVE_TYPE long |
| 208 | # endif | 180 | # endif |
| 209 | 181 | ||
| 210 | # ifdef sony_news | ||
| 211 | # define LOAD_AVE_TYPE long | ||
| 212 | # endif | ||
| 213 | |||
| 214 | # ifdef sequent | ||
| 215 | # define LOAD_AVE_TYPE long | ||
| 216 | # endif | ||
| 217 | |||
| 218 | # ifdef OSF_ALPHA | 182 | # ifdef OSF_ALPHA |
| 219 | # define LOAD_AVE_TYPE long | 183 | # define LOAD_AVE_TYPE long |
| 220 | # endif | 184 | # endif |
| 221 | 185 | ||
| 222 | # if defined (ardent) && defined (titan) | ||
| 223 | # define LOAD_AVE_TYPE long | ||
| 224 | # endif | ||
| 225 | |||
| 226 | # ifdef tek4300 | ||
| 227 | # define LOAD_AVE_TYPE long | ||
| 228 | # endif | ||
| 229 | |||
| 230 | # if defined (alliant) && defined (i860) /* Alliant FX/2800 */ | ||
| 231 | # define LOAD_AVE_TYPE long | ||
| 232 | # endif | ||
| 233 | |||
| 234 | # if defined _AIX && ! defined HAVE_LIBPERFSTAT | 186 | # if defined _AIX && ! defined HAVE_LIBPERFSTAT |
| 235 | # define LOAD_AVE_TYPE long | 187 | # define LOAD_AVE_TYPE long |
| 236 | # endif | 188 | # endif |
| 237 | 189 | ||
| 238 | # ifdef convex | ||
| 239 | # define LOAD_AVE_TYPE double | ||
| 240 | # ifndef LDAV_CVT | ||
| 241 | # define LDAV_CVT(n) (n) | ||
| 242 | # endif | ||
| 243 | # endif | ||
| 244 | |||
| 245 | # endif /* No LOAD_AVE_TYPE. */ | 190 | # endif /* No LOAD_AVE_TYPE. */ |
| 246 | 191 | ||
| 247 | # ifdef OSF_ALPHA | 192 | # ifdef OSF_ALPHA |
| @@ -251,13 +196,6 @@ | |||
| 251 | # define FSCALE 1024.0 | 196 | # define FSCALE 1024.0 |
| 252 | # endif | 197 | # endif |
| 253 | 198 | ||
| 254 | # if defined (alliant) && defined (i860) /* Alliant FX/2800 */ | ||
| 255 | /* <sys/param.h> defines an incorrect value for FSCALE on an | ||
| 256 | Alliant FX/2800 Concentrix 2.2, according to ghazi@noc.rutgers.edu. */ | ||
| 257 | # undef FSCALE | ||
| 258 | # define FSCALE 100.0 | ||
| 259 | # endif | ||
| 260 | |||
| 261 | 199 | ||
| 262 | # ifndef FSCALE | 200 | # ifndef FSCALE |
| 263 | 201 | ||
| @@ -267,25 +205,17 @@ | |||
| 267 | # define FSCALE 2048.0 | 205 | # define FSCALE 2048.0 |
| 268 | # endif | 206 | # endif |
| 269 | 207 | ||
| 270 | # if defined (MIPS) || defined (SVR4) || defined (decstation) | 208 | # if defined (MIPS) || defined (SVR4) |
| 271 | # define FSCALE 256 | 209 | # define FSCALE 256 |
| 272 | # endif | 210 | # endif |
| 273 | 211 | ||
| 274 | # if defined (sgi) || defined (sequent) | 212 | # if defined (sgi) |
| 275 | /* Sometimes both MIPS and sgi are defined, so FSCALE was just defined | 213 | /* Sometimes both MIPS and sgi are defined, so FSCALE was just defined |
| 276 | above under #ifdef MIPS. But we want the sgi value. */ | 214 | above under #ifdef MIPS. But we want the sgi value. */ |
| 277 | # undef FSCALE | 215 | # undef FSCALE |
| 278 | # define FSCALE 1000.0 | 216 | # define FSCALE 1000.0 |
| 279 | # endif | 217 | # endif |
| 280 | 218 | ||
| 281 | # if defined (ardent) && defined (titan) | ||
| 282 | # define FSCALE 65536.0 | ||
| 283 | # endif | ||
| 284 | |||
| 285 | # ifdef tek4300 | ||
| 286 | # define FSCALE 100.0 | ||
| 287 | # endif | ||
| 288 | |||
| 289 | # if defined _AIX && !defined HAVE_LIBPERFSTAT | 219 | # if defined _AIX && !defined HAVE_LIBPERFSTAT |
| 290 | # define FSCALE 65536.0 | 220 | # define FSCALE 65536.0 |
| 291 | # endif | 221 | # endif |
| @@ -307,24 +237,16 @@ | |||
| 307 | # endif | 237 | # endif |
| 308 | 238 | ||
| 309 | 239 | ||
| 310 | # if !defined (KERNEL_FILE) && defined (sequent) | ||
| 311 | # define KERNEL_FILE "/dynix" | ||
| 312 | # endif | ||
| 313 | |||
| 314 | # if !defined (KERNEL_FILE) && defined (hpux) | 240 | # if !defined (KERNEL_FILE) && defined (hpux) |
| 315 | # define KERNEL_FILE "/hp-ux" | 241 | # define KERNEL_FILE "/hp-ux" |
| 316 | # endif | 242 | # endif |
| 317 | 243 | ||
| 318 | # if !defined (KERNEL_FILE) && (defined (_SEQUENT_) || defined (MIPS) || defined (SVR4) || defined (ISC) || defined (sgi) || (defined (ardent) && defined (titan))) | 244 | # if !defined (KERNEL_FILE) && (defined (MIPS) || defined (SVR4) || defined (ISC) || defined (sgi)) |
| 319 | # define KERNEL_FILE "/unix" | 245 | # define KERNEL_FILE "/unix" |
| 320 | # endif | 246 | # endif |
| 321 | 247 | ||
| 322 | 248 | ||
| 323 | # if !defined (LDAV_SYMBOL) && defined (alliant) | 249 | # if !defined (LDAV_SYMBOL) && (defined (hpux) || defined (SVR4) || defined (ISC) || defined (sgi) || (defined (_AIX) && !defined(HAVE_LIBPERFSTAT))) |
| 324 | # define LDAV_SYMBOL "_Loadavg" | ||
| 325 | # endif | ||
| 326 | |||
| 327 | # if !defined (LDAV_SYMBOL) && ((defined (hpux) && !defined (hp9000s300)) || defined (_SEQUENT_) || defined (SVR4) || defined (ISC) || defined (sgi) || (defined (ardent) && defined (titan)) || (defined (_AIX) && !defined(HAVE_LIBPERFSTAT))) | ||
| 328 | # define LDAV_SYMBOL "avenrun" | 250 | # define LDAV_SYMBOL "avenrun" |
| 329 | # endif | 251 | # endif |
| 330 | 252 | ||
| @@ -921,7 +843,7 @@ getloadavg (double loadavg[], int nelem) | |||
| 921 | 843 | ||
| 922 | # ifndef SUNOS_5 | 844 | # ifndef SUNOS_5 |
| 923 | if ( | 845 | if ( |
| 924 | # if !(defined (_AIX) && !defined (ps2)) | 846 | # if !defined (_AIX) |
| 925 | nlist (KERNEL_FILE, name_list) | 847 | nlist (KERNEL_FILE, name_list) |
| 926 | # else /* _AIX */ | 848 | # else /* _AIX */ |
| 927 | knlist (name_list, 1, sizeof (name_list[0])) | 849 | knlist (name_list, 1, sizeof (name_list[0])) |
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 982d3c5c297..c87a15e0197 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -82,6 +82,7 @@ | |||
| 82 | # crypto/sha512-buffer \ | 82 | # crypto/sha512-buffer \ |
| 83 | # d-type \ | 83 | # d-type \ |
| 84 | # diffseq \ | 84 | # diffseq \ |
| 85 | # dosname \ | ||
| 85 | # dtoastr \ | 86 | # dtoastr \ |
| 86 | # dtotimespec \ | 87 | # dtotimespec \ |
| 87 | # dup2 \ | 88 | # dup2 \ |
| @@ -1403,9 +1404,7 @@ endif | |||
| 1403 | ## begin gnulib module dosname | 1404 | ## begin gnulib module dosname |
| 1404 | ifeq (,$(OMIT_GNULIB_MODULE_dosname)) | 1405 | ifeq (,$(OMIT_GNULIB_MODULE_dosname)) |
| 1405 | 1406 | ||
| 1406 | ifneq (,$(gl_GNULIB_ENABLED_dosname)) | ||
| 1407 | 1407 | ||
| 1408 | endif | ||
| 1409 | EXTRA_DIST += dosname.h | 1408 | EXTRA_DIST += dosname.h |
| 1410 | 1409 | ||
| 1411 | endif | 1410 | endif |
diff --git a/lib/nstrftime.c b/lib/nstrftime.c index 46e806e6049..1dd49c0f782 100644 --- a/lib/nstrftime.c +++ b/lib/nstrftime.c | |||
| @@ -1438,28 +1438,10 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) | |||
| 1438 | # endif | 1438 | # endif |
| 1439 | 1439 | ||
| 1440 | ltm = *tp; | 1440 | ltm = *tp; |
| 1441 | ltm.tm_wday = -1; | ||
| 1441 | lt = mktime_z (tz, <m); | 1442 | lt = mktime_z (tz, <m); |
| 1442 | 1443 | if (ltm.tm_wday < 0 || ! localtime_rz (0, <, >m)) | |
| 1443 | if (lt == (time_t) -1) | ||
| 1444 | { | ||
| 1445 | /* mktime returns -1 for errors, but -1 is also a | ||
| 1446 | valid time_t value. Check whether an error really | ||
| 1447 | occurred. */ | ||
| 1448 | struct tm tm; | ||
| 1449 | |||
| 1450 | if (! localtime_rz (tz, <, &tm) | ||
| 1451 | || ((ltm.tm_sec ^ tm.tm_sec) | ||
| 1452 | | (ltm.tm_min ^ tm.tm_min) | ||
| 1453 | | (ltm.tm_hour ^ tm.tm_hour) | ||
| 1454 | | (ltm.tm_mday ^ tm.tm_mday) | ||
| 1455 | | (ltm.tm_mon ^ tm.tm_mon) | ||
| 1456 | | (ltm.tm_year ^ tm.tm_year))) | ||
| 1457 | break; | ||
| 1458 | } | ||
| 1459 | |||
| 1460 | if (! localtime_rz (0, <, >m)) | ||
| 1461 | break; | 1444 | break; |
| 1462 | |||
| 1463 | diff = tm_diff (<m, >m); | 1445 | diff = tm_diff (<m, >m); |
| 1464 | } | 1446 | } |
| 1465 | #endif | 1447 | #endif |
diff --git a/lib/time.in.h b/lib/time.in.h index cda16c69d2c..3128f44a6f7 100644 --- a/lib/time.in.h +++ b/lib/time.in.h | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | /* The definition of _GL_WARN_ON_USE is copied here. */ | 49 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
| 50 | 50 | ||
| 51 | /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). | 51 | /* Some systems don't define struct timespec (e.g., AIX 4.1). |
| 52 | Or they define it with the wrong member names or define it in <sys/time.h> | 52 | Or they define it with the wrong member names or define it in <sys/time.h> |
| 53 | (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, | 53 | (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, |
| 54 | but the pthreads-win32 library defines it in <pthread.h>. */ | 54 | but the pthreads-win32 library defines it in <pthread.h>. */ |