diff options
| author | Paul Eggert | 2011-01-08 20:31:19 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-01-08 20:31:19 -0800 |
| commit | 1e11dbe3d862434ded0d5718f737f1f03f3141be (patch) | |
| tree | 5bd68a442b08c2306ec4ffef540846ed9d4c2f90 | |
| parent | a451f14b09368f4b9f96d61ddb2ee69ac048c414 (diff) | |
| download | emacs-1e11dbe3d862434ded0d5718f737f1f03f3141be.tar.gz emacs-1e11dbe3d862434ded0d5718f737f1f03f3141be.zip | |
Use gnulib's mktime module.
| -rw-r--r-- | ChangeLog | 14 | ||||
| -rw-r--r-- | Makefile.in | 2 | ||||
| -rw-r--r-- | configure.in | 30 | ||||
| -rwxr-xr-x | make-dist | 1 | ||||
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/deps.mk | 1 |
6 files changed, 19 insertions, 32 deletions
| @@ -1,6 +1,18 @@ | |||
| 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Use gnulib ftoastr module. | 3 | Use gnulib's mktime module. |
| 4 | * Makefile.in (GNULIB_MODULES): Add mktime. | ||
| 5 | * configure.in: Remove code no longer needed, as gnulib now does it. | ||
| 6 | (AC_CHECK_FUNCS): Remove mktime. | ||
| 7 | (AC_FUNC_MKTIME, BROKEN_MKTIME): Remove. | ||
| 8 | (__restrict): Remove, as this now gets in the way of the C99 | ||
| 9 | support for 'restrict' pulled in by the gnulib mktime module. | ||
| 10 | Code should now use 'restrict' and not '__restrict". | ||
| 11 | (mktime): Remove. | ||
| 12 | * make-dist: Put gnulib-generated files arg-nonnull.h, c++defs.h, | ||
| 13 | and warn-on-use.h into the distribution. | ||
| 14 | |||
| 15 | Use gnulib's ftoastr module. | ||
| 4 | * Makefile.in (GNULIB_MODULES): Add ftoastr. Remove dummy. | 16 | * Makefile.in (GNULIB_MODULES): Add ftoastr. Remove dummy. |
| 5 | 17 | ||
| 6 | 2011-01-08 Paul Eggert <eggert@cs.ucla.edu> | 18 | 2011-01-08 Paul Eggert <eggert@cs.ucla.edu> |
diff --git a/Makefile.in b/Makefile.in index 30692b46a70..b4cc82c7089 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -330,7 +330,7 @@ $(gnulib_srcdir): | |||
| 330 | # Update modules from gnulib, for maintainers, who should have it in | 330 | # Update modules from gnulib, for maintainers, who should have it in |
| 331 | # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools | 331 | # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools |
| 332 | # as per $(gnulib_srcdir)/DEPENDENCIES. | 332 | # as per $(gnulib_srcdir)/DEPENDENCIES. |
| 333 | GNULIB_MODULES = ftoastr | 333 | GNULIB_MODULES = ftoastr mktime |
| 334 | GNULIB_TOOL_FLAGS = \ | 334 | GNULIB_TOOL_FLAGS = \ |
| 335 | --import --no-changelog --no-vc-files --makefile-name=gnulib.mk | 335 | --import --no-changelog --no-vc-files --makefile-name=gnulib.mk |
| 336 | sync-from-gnulib: $(gnulib_srcdir) | 336 | sync-from-gnulib: $(gnulib_srcdir) |
diff --git a/configure.in b/configure.in index a267481c212..5ef67ce0e57 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -2632,7 +2632,7 @@ AC_SUBST(BLESSMAIL_TARGET) | |||
| 2632 | AC_CHECK_FUNCS(gethostname getdomainname dup2 \ | 2632 | AC_CHECK_FUNCS(gethostname getdomainname dup2 \ |
| 2633 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ | 2633 | rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ |
| 2634 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ | 2634 | random lrand48 logb frexp fmod rint cbrt ftime setsid \ |
| 2635 | strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ | 2635 | strerror fpathconf select euidaccess getpagesize tzset setlocale \ |
| 2636 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ | 2636 | utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
| 2637 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ | 2637 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ |
| 2638 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ | 2638 | sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
| @@ -2653,11 +2653,6 @@ fi | |||
| 2653 | 2653 | ||
| 2654 | AC_CHECK_HEADERS(sys/un.h) | 2654 | AC_CHECK_HEADERS(sys/un.h) |
| 2655 | 2655 | ||
| 2656 | AC_FUNC_MKTIME | ||
| 2657 | if test "$ac_cv_func_working_mktime" = no; then | ||
| 2658 | AC_DEFINE(BROKEN_MKTIME, 1, [Define to 1 if the mktime function is broken.]) | ||
| 2659 | fi | ||
| 2660 | |||
| 2661 | AC_FUNC_GETLOADAVG | 2656 | AC_FUNC_GETLOADAVG |
| 2662 | 2657 | ||
| 2663 | AC_FUNC_FSEEKO | 2658 | AC_FUNC_FSEEKO |
| @@ -3039,24 +3034,6 @@ AC_CHECK_TYPES(size_t) | |||
| 3039 | 3034 | ||
| 3040 | AC_TYPE_MBSTATE_T | 3035 | AC_TYPE_MBSTATE_T |
| 3041 | 3036 | ||
| 3042 | dnl Restrict could probably be used effectively other than in regex.c. | ||
| 3043 | AC_CACHE_CHECK([for C restrict keyword], emacs_cv_c_restrict, | ||
| 3044 | [AC_TRY_COMPILE([void fred (int *restrict x);], [], | ||
| 3045 | emacs_cv_c_restrict=yes, | ||
| 3046 | [AC_TRY_COMPILE([void fred (int *__restrict x);], [], | ||
| 3047 | emacs_cv_c_restrict=__restrict, | ||
| 3048 | emacs_cv_c_restrict=no)])]) | ||
| 3049 | case "$emacs_cv_c_restrict" in | ||
| 3050 | yes) emacs_restrict=restrict;; | ||
| 3051 | no) emacs_restrict="";; | ||
| 3052 | *) emacs_restrict="$emacs_cv_c_restrict";; | ||
| 3053 | esac | ||
| 3054 | if test "$emacs_restrict" != __restrict; then | ||
| 3055 | AC_DEFINE_UNQUOTED(__restrict, $emacs_restrict, | ||
| 3056 | [Define to compiler's equivalent of C99 restrict keyword. | ||
| 3057 | Don't define if equivalent is `__restrict'.]) | ||
| 3058 | fi | ||
| 3059 | |||
| 3060 | AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, | 3037 | AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, |
| 3061 | [AC_TRY_COMPILE([void fred (int x[__restrict]);], [], | 3038 | [AC_TRY_COMPILE([void fred (int x[__restrict]);], [], |
| 3062 | emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) | 3039 | emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) |
| @@ -3546,11 +3523,6 @@ AH_BOTTOM([ | |||
| 3546 | #endif | 3523 | #endif |
| 3547 | #endif | 3524 | #endif |
| 3548 | 3525 | ||
| 3549 | /* Avoid link-time collision with system mktime if we will use our own. */ | ||
| 3550 | #if ! HAVE_MKTIME || BROKEN_MKTIME | ||
| 3551 | #define mktime emacs_mktime | ||
| 3552 | #endif | ||
| 3553 | |||
| 3554 | #define my_strftime nstrftime /* for strftime.c */ | 3526 | #define my_strftime nstrftime /* for strftime.c */ |
| 3555 | 3527 | ||
| 3556 | /* These default definitions are good for almost all machines. | 3528 | /* These default definitions are good for almost all machines. |
| @@ -288,6 +288,7 @@ ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} | |||
| 288 | ln mkinstalldirs config.sub config.guess install-sh ${tempdir} | 288 | ln mkinstalldirs config.sub config.guess install-sh ${tempdir} |
| 289 | ln aclocal.m4 ${tempdir} | 289 | ln aclocal.m4 ${tempdir} |
| 290 | ln compile depcomp missing ${tempdir} | 290 | ln compile depcomp missing ${tempdir} |
| 291 | ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir} | ||
| 291 | 292 | ||
| 292 | echo "Creating subdirectories" | 293 | echo "Creating subdirectories" |
| 293 | for subdir in site-lisp \ | 294 | for subdir in site-lisp \ |
diff --git a/src/ChangeLog b/src/ChangeLog index a7d7b87a9b5..52eb207466c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Use gnulib's mktime module. | ||
| 4 | * deps.mk (mktime.o): Remove rule. | ||
| 5 | |||
| 3 | Use gnulib's ftoastr module. | 6 | Use gnulib's ftoastr module. |
| 4 | * print.c: Include ftoastr.h. | 7 | * print.c: Include ftoastr.h. |
| 5 | (FLT_RADIX, DBL_MANT_DIG, DBL_DIG, DBL_MIN, DOUBLE_DIGITS_BOUND): | 8 | (FLT_RADIX, DBL_MANT_DIG, DBL_DIG, DBL_MIN, DOUBLE_DIGITS_BOUND): |
diff --git a/src/deps.mk b/src/deps.mk index eebf98ec003..eb7dfedd3b6 100644 --- a/src/deps.mk +++ b/src/deps.mk | |||
| @@ -138,7 +138,6 @@ md5.o: md5.c md5.h $(config_h) | |||
| 138 | minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \ | 138 | minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \ |
| 139 | buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \ | 139 | buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \ |
| 140 | termhooks.h lisp.h $(config_h) coding.h | 140 | termhooks.h lisp.h $(config_h) coding.h |
| 141 | mktime.o: mktime.c $(config_h) | ||
| 142 | msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ | 141 | msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ |
| 143 | termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ | 142 | termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ |
| 144 | keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h \ | 143 | keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h \ |