aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-01-08 20:31:19 -0800
committerPaul Eggert2011-01-08 20:31:19 -0800
commit1e11dbe3d862434ded0d5718f737f1f03f3141be (patch)
tree5bd68a442b08c2306ec4ffef540846ed9d4c2f90
parenta451f14b09368f4b9f96d61ddb2ee69ac048c414 (diff)
downloademacs-1e11dbe3d862434ded0d5718f737f1f03f3141be.tar.gz
emacs-1e11dbe3d862434ded0d5718f737f1f03f3141be.zip
Use gnulib's mktime module.
-rw-r--r--ChangeLog14
-rw-r--r--Makefile.in2
-rw-r--r--configure.in30
-rwxr-xr-xmake-dist1
-rw-r--r--src/ChangeLog3
-rw-r--r--src/deps.mk1
6 files changed, 19 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 2cb57b73075..ad18cf10a39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
12011-01-09 Paul Eggert <eggert@cs.ucla.edu> 12011-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
62011-01-08 Paul Eggert <eggert@cs.ucla.edu> 182011-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.
333GNULIB_MODULES = ftoastr 333GNULIB_MODULES = ftoastr mktime
334GNULIB_TOOL_FLAGS = \ 334GNULIB_TOOL_FLAGS = \
335 --import --no-changelog --no-vc-files --makefile-name=gnulib.mk 335 --import --no-changelog --no-vc-files --makefile-name=gnulib.mk
336sync-from-gnulib: $(gnulib_srcdir) 336sync-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)
2632AC_CHECK_FUNCS(gethostname getdomainname dup2 \ 2632AC_CHECK_FUNCS(gethostname getdomainname dup2 \
2633rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ 2633rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
2634random lrand48 logb frexp fmod rint cbrt ftime setsid \ 2634random lrand48 logb frexp fmod rint cbrt ftime setsid \
2635strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ 2635strerror fpathconf select euidaccess getpagesize tzset setlocale \
2636utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ 2636utimes 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 \
2638sendto recvfrom getsockopt setsockopt getsockname getpeername \ 2638sendto recvfrom getsockopt setsockopt getsockname getpeername \
@@ -2653,11 +2653,6 @@ fi
2653 2653
2654AC_CHECK_HEADERS(sys/un.h) 2654AC_CHECK_HEADERS(sys/un.h)
2655 2655
2656AC_FUNC_MKTIME
2657if test "$ac_cv_func_working_mktime" = no; then
2658 AC_DEFINE(BROKEN_MKTIME, 1, [Define to 1 if the mktime function is broken.])
2659fi
2660
2661AC_FUNC_GETLOADAVG 2656AC_FUNC_GETLOADAVG
2662 2657
2663AC_FUNC_FSEEKO 2658AC_FUNC_FSEEKO
@@ -3039,24 +3034,6 @@ AC_CHECK_TYPES(size_t)
3039 3034
3040AC_TYPE_MBSTATE_T 3035AC_TYPE_MBSTATE_T
3041 3036
3042dnl Restrict could probably be used effectively other than in regex.c.
3043AC_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)])])
3049case "$emacs_cv_c_restrict" in
3050 yes) emacs_restrict=restrict;;
3051 no) emacs_restrict="";;
3052 *) emacs_restrict="$emacs_cv_c_restrict";;
3053esac
3054if 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'.])
3058fi
3059
3060AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, 3037AC_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.
diff --git a/make-dist b/make-dist
index 3f8ea55b3dc..4227439c919 100755
--- a/make-dist
+++ b/make-dist
@@ -288,6 +288,7 @@ ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir}
288ln mkinstalldirs config.sub config.guess install-sh ${tempdir} 288ln mkinstalldirs config.sub config.guess install-sh ${tempdir}
289ln aclocal.m4 ${tempdir} 289ln aclocal.m4 ${tempdir}
290ln compile depcomp missing ${tempdir} 290ln compile depcomp missing ${tempdir}
291ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir}
291 292
292echo "Creating subdirectories" 293echo "Creating subdirectories"
293for subdir in site-lisp \ 294for 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 @@
12011-01-09 Paul Eggert <eggert@cs.ucla.edu> 12011-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)
138minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \ 138minibuf.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
141mktime.o: mktime.c $(config_h)
142msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ 141msdos.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 \