Now on revision 112045. ------------------------------------------------------------ revno: 112045 committer: Tassilo Horn branch nick: trunk timestamp: Thu 2013-03-14 22:33:07 +0100 message: * doc-view.el Fix bug#13887. (doc-view-insert-image): Don't modify overlay associated to non-live windows, and implement horizontal centering of image in case it's smaller than the window. (doc-view-new-window-function): Force redisplay of new windows on doc-view buffers. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-14 15:24:04 +0000 +++ lisp/ChangeLog 2013-03-14 21:33:07 +0000 @@ -1,9 +1,11 @@ 2013-03-14 Tassilo Horn - * doc-view.el (doc-view-insert-image): Don't modify overlay - associated with pseudo winprops entry, and implement horizontal - centering of image in case it's smaller than the window - (bug#13887). + * doc-view.el Fix bug#13887. + (doc-view-insert-image): Don't modify overlay associated to + non-live windows, and implement horizontal centering of image in + case it's smaller than the window. + (doc-view-new-window-function): Force redisplay of new windows on + doc-view buffers. 2013-03-13 Karl Fogel === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2013-03-14 15:24:04 +0000 +++ lisp/doc-view.el 2013-03-14 21:33:07 +0000 @@ -324,7 +324,26 @@ ;; `window' property is only effective if its value is a window). (cl-assert (eq t (car winprops))) (delete-overlay ol)) - (image-mode-window-put 'overlay ol winprops))) + (image-mode-window-put 'overlay ol winprops) + (when (windowp (car winprops)) + (if (stringp (get-char-property (point-min) 'display)) + ;; We're not already displaying an image, so this is the + ;; initial window showing the document. + (run-with-timer nil nil + (lambda () + ;; In case a conversion is running, the + ;; refresh will happen as defined by + ;; `doc-view-conversion-refresh-interval'. + (unless doc-view-current-converter-processes + (with-selected-window (car winprops) + (doc-view-goto-page 1))))) + ;; We've split the window showing the document. All we need + ;; to do is selecting the new window to make the image appear + ;; there, too. + (run-with-timer nil nil + (lambda () + (save-window-excursion + (select-window (car winprops))))))))) (defvar doc-view-current-files nil "Only used internally.") @@ -535,7 +554,7 @@ (with-selected-window win (doc-view-goto-page page)))))))) (overlay-put (doc-view-current-overlay) - 'help-echo (doc-view-current-info)))) + 'help-echo (doc-view-current-info)))) (defun doc-view-next-page (&optional arg) "Browse ARG pages forward." @@ -1251,9 +1270,8 @@ (clear-image-cache) (setq doc-view-pending-cache-flush nil)) (let ((ol (doc-view-current-overlay))) - ;; ol might be deleted (see `doc-view-new-window-function'), in - ;; which case we don't want to modify it. - (when (overlay-buffer ol) + ;; Only insert the image if the buffer is visible. + (when (window-live-p (overlay-get ol 'window)) (let* ((image (if (and file (file-readable-p file)) (if (not (and doc-view-scale-internally (fboundp 'imagemagick-types))) ------------------------------------------------------------ revno: 112044 fixes bug: http://debbugs.gnu.org/13953 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2013-03-14 19:37:51 +0200 message: Fix bug #13953 with spontaneous frame resizes on MS-Windows. src/w32term.c (w32_read_socket) : Remove old and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE and WM_ACTIVATEAPP. (w32fullscreen_hook): If the frame is visible, reset f->want_fullscreen flag after changing the frame size. If the frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-13 19:28:50 +0000 +++ src/ChangeLog 2013-03-14 17:37:51 +0000 @@ -1,3 +1,13 @@ +2013-03-14 Eli Zaretskii + + * w32term.c (w32_read_socket) : Remove old + and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE + and WM_ACTIVATEAPP. + (w32fullscreen_hook): If the frame is visible, reset + f->want_fullscreen flag after changing the frame size. If the + frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT. + (Bug#13953) + 2013-03-13 Daniel Colascione * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds === modified file 'src/w32term.c' --- src/w32term.c 2013-03-13 17:31:06 +0000 +++ src/w32term.c 2013-03-14 17:37:51 +0000 @@ -4705,26 +4705,20 @@ } case WM_WINDOWPOSCHANGED: - f = x_window_to_frame (dpyinfo, msg.msg.hwnd); - if (f) - { - if (f->want_fullscreen & FULLSCREEN_WAIT) - f->want_fullscreen &= ~(FULLSCREEN_WAIT|FULLSCREEN_BOTH); - } - check_visibility = 1; - break; - case WM_ACTIVATE: case WM_ACTIVATEAPP: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { - /* If we are being activated, run the full-screen hook - function, to actually install the required size in - effect. This is because when the hook is run from - x_set_fullscreen, the frame might not yet be visible, - if that call is a result of make-frame. */ - if (msg.msg.wParam) + /* Run the full-screen hook function also when we are + being activated, to actually install the required + size in effect, if the WAIT flag is set. This is + because when the hook is run from x_set_fullscreen, + the frame might not yet be visible, if that call is a + result of make-frame, and in that case the hook just + sets the WAIT flag. */ + if ((msg.msg.message == WM_WINDOWPOSCHANGED || msg.msg.wParam) + && (f->want_fullscreen & FULLSCREEN_WAIT)) w32fullscreen_hook (f); x_check_fullscreen (f); } @@ -5739,8 +5733,11 @@ x_set_window_size (f, 1, width, height); do_pending_window_change (0); } + f->want_fullscreen = FULLSCREEN_NONE; unblock_input (); } + else + f->want_fullscreen |= FULLSCREEN_WAIT; } /* Call this to change the size of frame F's x-window. ------------------------------------------------------------ revno: 112043 committer: Tassilo Horn branch nick: trunk timestamp: Thu 2013-03-14 16:24:04 +0100 message: * doc-view.el (doc-view-insert-image): Don't modify overlay associated with pseudo winprops entry, and implement horizontal centering of image in case it's smaller than the window (bug#13887). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-13 18:54:05 +0000 +++ lisp/ChangeLog 2013-03-14 15:24:04 +0000 @@ -1,3 +1,10 @@ +2013-03-14 Tassilo Horn + + * doc-view.el (doc-view-insert-image): Don't modify overlay + associated with pseudo winprops entry, and implement horizontal + centering of image in case it's smaller than the window + (bug#13887). + 2013-03-13 Karl Fogel * saveplace.el (save-place-alist-to-file): Don't sort === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2013-02-28 04:02:36 +0000 +++ lisp/doc-view.el 2013-03-14 15:24:04 +0000 @@ -1250,44 +1250,60 @@ (when doc-view-pending-cache-flush (clear-image-cache) (setq doc-view-pending-cache-flush nil)) - (let ((ol (doc-view-current-overlay)) - (image (if (and file (file-readable-p file)) - (if (not (and doc-view-scale-internally - (fboundp 'imagemagick-types))) - (apply 'create-image file doc-view--image-type nil args) - (unless (member :width args) - (setq args `(,@args :width ,doc-view-image-width))) - (apply 'create-image file 'imagemagick nil args)))) - (slice (doc-view-current-slice))) - (setf (doc-view-current-image) image) - (move-overlay ol (point-min) (point-max)) - (overlay-put ol 'display - (cond - (image - (if slice - (list (cons 'slice slice) image) - image)) - ;; We're trying to display a page that doesn't exist. - (doc-view-current-converter-processes - ;; Maybe the page doesn't exist *yet*. - "Cannot display this page (yet)!") - (t - ;; Typically happens if the conversion process somehow - ;; failed. Better not signal an error here because it - ;; could prevent a subsequent reconversion from fixing - ;; the problem. - (concat "Cannot display this page!\n" - "Maybe because of a conversion failure!")))) - (let ((win (overlay-get ol 'window))) - (if (stringp (overlay-get ol 'display)) - (progn ;Make sure the text is not scrolled out of view. - (set-window-hscroll win 0) - (set-window-vscroll win 0)) - (let ((hscroll (image-mode-window-get 'hscroll win)) - (vscroll (image-mode-window-get 'vscroll win))) - ;; Reset scroll settings, in case they were changed. - (if hscroll (set-window-hscroll win hscroll)) - (if vscroll (set-window-vscroll win vscroll))))))) + (let ((ol (doc-view-current-overlay))) + ;; ol might be deleted (see `doc-view-new-window-function'), in + ;; which case we don't want to modify it. + (when (overlay-buffer ol) + (let* ((image (if (and file (file-readable-p file)) + (if (not (and doc-view-scale-internally + (fboundp 'imagemagick-types))) + (apply 'create-image file doc-view--image-type nil args) + (unless (member :width args) + (setq args `(,@args :width ,doc-view-image-width))) + (apply 'create-image file 'imagemagick nil args)))) + (slice (doc-view-current-slice)) + (img-width (and image (car (image-size image)))) + (displayed-img-width (if (and image slice) + (* (/ (float (nth 2 slice)) + (car (image-size image 'pixels))) + img-width) + img-width)) + (window-width (window-width (selected-window)))) + (setf (doc-view-current-image) image) + (move-overlay ol (point-min) (point-max)) + ;; In case the window is wider than the image, center the image + ;; horizontally. + (overlay-put ol 'before-string + (when (and image (> window-width displayed-img-width)) + (propertize " " 'display + `(space :align-to (+ center (-0.5 . ,displayed-img-width)))))) + (overlay-put ol 'display + (cond + (image + (if slice + (list (cons 'slice slice) image) + image)) + ;; We're trying to display a page that doesn't exist. + (doc-view-current-converter-processes + ;; Maybe the page doesn't exist *yet*. + "Cannot display this page (yet)!") + (t + ;; Typically happens if the conversion process somehow + ;; failed. Better not signal an error here because it + ;; could prevent a subsequent reconversion from fixing + ;; the problem. + (concat "Cannot display this page!\n" + "Maybe because of a conversion failure!")))) + (let ((win (overlay-get ol 'window))) + (if (stringp (overlay-get ol 'display)) + (progn ;Make sure the text is not scrolled out of view. + (set-window-hscroll win 0) + (set-window-vscroll win 0)) + (let ((hscroll (image-mode-window-get 'hscroll win)) + (vscroll (image-mode-window-get 'vscroll win))) + ;; Reset scroll settings, in case they were changed. + (if hscroll (set-window-hscroll win hscroll)) + (if vscroll (set-window-vscroll win vscroll))))))))) (defun doc-view-sort (a b) "Return non-nil if A should be sorted before B. ------------------------------------------------------------ revno: 112042 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-03-14 06:17:38 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2013-02-25 11:17:36 +0000 +++ autogen/Makefile.in 2013-03-14 10:17:38 +0000 @@ -36,7 +36,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdopendir filemode fstatat getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -71,8 +71,9 @@ $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/m4/extern-inline.m4 \ $(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fcntl_h.m4 \ - $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/filemode.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fdatasync.m4 $(top_srcdir)/m4/fdopendir.m4 \ + $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/fsync.m4 \ $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/getloadavg.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettime.m4 \ $(top_srcdir)/m4/gettimeofday.m4 \ @@ -657,6 +658,7 @@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ LIB_EXECINFO = @LIB_EXECINFO@ +LIB_FDATASYNC = @LIB_FDATASYNC@ LIB_MATH = @LIB_MATH@ LIB_PTHREAD = @LIB_PTHREAD@ LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@ @@ -988,13 +990,13 @@ careadlinkat.h close-stream.h md5.h sha1.h sha256.h sha512.h \ dirent.in.h dosname.h ftoastr.c ftoastr.h dup2.c euidaccess.c \ execinfo.c execinfo.in.h at-func.c faccessat.c fcntl.in.h \ - fdopendir.c filemode.h fpending.c fpending.h at-func.c \ - fstatat.c getgroups.c getloadavg.c getopt.c getopt.in.h \ - getopt1.c getopt_int.h gettimeofday.c group-member.c \ - ignore-value.h intprops.h inttypes.in.h lstat.c memrchr.c \ - mktime-internal.h mktime.c openat.h pathmax.h pselect.c \ - pthread_sigmask.c putenv.c readlink.c at-func.c readlinkat.c \ - root-uid.h sig2str.c sig2str.h signal.in.h \ + fdatasync.c fdopendir.c filemode.h fpending.c fpending.h \ + at-func.c fstatat.c fsync.c getgroups.c getloadavg.c getopt.c \ + getopt.in.h getopt1.c getopt_int.h gettimeofday.c \ + group-member.c ignore-value.h intprops.h inttypes.in.h lstat.c \ + memrchr.c mktime-internal.h mktime.c openat.h pathmax.h \ + pselect.c pthread_sigmask.c putenv.c readlink.c at-func.c \ + readlinkat.c root-uid.h sig2str.c sig2str.h signal.in.h \ $(top_srcdir)/build-aux/snippet/_Noreturn.h \ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ $(top_srcdir)/build-aux/snippet/c++defs.h \ @@ -1028,13 +1030,13 @@ libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = openat-proc.c ftoastr.c dup2.c euidaccess.c \ - execinfo.c at-func.c faccessat.c fdopendir.c fpending.c \ - at-func.c fstatat.c getgroups.c getloadavg.c getopt.c \ - getopt1.c gettimeofday.c group-member.c lstat.c memrchr.c \ - mktime.c pselect.c pthread_sigmask.c putenv.c readlink.c \ - at-func.c readlinkat.c sig2str.c stat.c strtoimax.c strtol.c \ - strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \ - strtoumax.c symlink.c time_r.c unsetenv.c + execinfo.c at-func.c faccessat.c fdatasync.c fdopendir.c \ + fpending.c at-func.c fstatat.c fsync.c getgroups.c \ + getloadavg.c getopt.c getopt1.c gettimeofday.c group-member.c \ + lstat.c memrchr.c mktime.c pselect.c pthread_sigmask.c \ + putenv.c readlink.c at-func.c readlinkat.c sig2str.c stat.c \ + strtoimax.c strtol.c strtoll.c strtol.c strtoul.c strtoull.c \ + strtoimax.c strtoumax.c symlink.c time_r.c unsetenv.c # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all Makefile.am that @@ -1105,10 +1107,12 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euidaccess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2013-02-12 11:17:35 +0000 +++ autogen/aclocal.m4 2013-03-14 10:17:38 +0000 @@ -998,10 +998,12 @@ m4_include([m4/extern-inline.m4]) m4_include([m4/faccessat.m4]) m4_include([m4/fcntl_h.m4]) +m4_include([m4/fdatasync.m4]) m4_include([m4/fdopendir.m4]) m4_include([m4/filemode.m4]) m4_include([m4/fpending.m4]) m4_include([m4/fstatat.m4]) +m4_include([m4/fsync.m4]) m4_include([m4/getgroups.m4]) m4_include([m4/getloadavg.m4]) m4_include([m4/getopt.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2013-03-13 10:17:36 +0000 +++ autogen/config.in 2013-03-14 10:17:38 +0000 @@ -56,12 +56,6 @@ /* Define on FreeBSD to work around an issue when reading from a PTY. */ #undef BROKEN_PTY_READ_AFTER_EAGAIN -/* Define if the system is compatible with BSD 4.2. */ -#undef BSD_SYSTEM - -/* Define if AH_BOTTOM should change BSD_SYSTEM. */ -#undef BSD_SYSTEM_AHB - /* Define if Emacs cannot be dumped on your system. */ #undef CANNOT_DUMP @@ -282,6 +276,10 @@ */ #undef HAVE_DECL_ALARM +/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you + don't. */ +#undef HAVE_DECL_FDATASYNC + /* Define to 1 if you have the declaration of `fdopendir', and to 0 if you don't. */ #undef HAVE_DECL_FDOPENDIR @@ -378,6 +376,9 @@ /* Define to 1 if you have the `faccessat' function. */ #undef HAVE_FACCESSAT +/* Define to 1 if you have the `fdatasync' function. */ +#undef HAVE_FDATASYNC + /* Define to 1 if you have the `fdopendir' function. */ #undef HAVE_FDOPENDIR === modified file 'autogen/configure' --- autogen/configure 2013-03-13 10:17:36 +0000 +++ autogen/configure 2013-03-14 10:17:38 +0000 @@ -1060,6 +1060,7 @@ GNULIB_FSTATAT GNULIB_FSTAT GNULIB_FCHMODAT +LIB_FDATASYNC NEXT_AS_FIRST_DIRECTIVE_FCNTL_H NEXT_FCNTL_H REPLACE_OPENAT @@ -3340,6 +3341,7 @@ as_fn_append ac_header_list " stdio_ext.h" as_fn_append ac_func_list " __fpending" as_fn_append ac_func_list " fstatat" +as_fn_append ac_func_list " fsync" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" as_fn_append ac_func_list " gettimeofday" @@ -7181,10 +7183,12 @@ # Code from module extern-inline: # Code from module faccessat: # Code from module fcntl-h: + # Code from module fdatasync: # Code from module fdopendir: # Code from module filemode: # Code from module fpending: # Code from module fstatat: + # Code from module fsync: # Code from module getgroups: # Code from module getloadavg: # Code from module getopt-gnu: @@ -13802,7 +13806,7 @@ utimes getrlimit setrlimit shutdown getaddrinfo \ strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ -gai_strerror mkstemp getline getdelim fsync sync \ +gai_strerror mkstemp getline getdelim sync \ difftime posix_memalign \ getpwent endpwent getgrent endgrent \ touchlock \ @@ -15904,7 +15908,6 @@ - case $opsys in aix4-2) $as_echo "#define USG /**/" >>confdefs.h @@ -15943,44 +15946,11 @@ ;; darwin) - $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h - $as_echo "#define DARWIN_OS /**/" >>confdefs.h ;; - freebsd) - -$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h - - ;; - - gnu | netbsd | openbsd ) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef BSD_SYSTEM -# error "BSD_SYSTEM not defined" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - $as_echo "#define BSD_SYSTEM 43" >>confdefs.h - -fi -rm -f conftest.err conftest.$ac_ext - ;; - gnu-linux | gnu-kfreebsd ) $as_echo "#define USG /**/" >>confdefs.h @@ -17212,6 +17182,17 @@ fi +ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default" +if test "x$ac_cv_have_decl_fdatasync" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FDATASYNC $ac_have_decl +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 @@ -17365,6 +17346,8 @@ + + GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; @@ -21302,6 +21285,114 @@ + LIB_FDATASYNC= + + + if test $ac_cv_have_decl_fdatasync = no; then + HAVE_DECL_FDATASYNC=0 + for ac_func in fdatasync +do : + ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" +if test "x$ac_cv_func_fdatasync" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FDATASYNC 1 +_ACEOF + +fi +done + + if test $ac_cv_func_fdatasync = no; then + HAVE_FDATASYNC=0 + fi + else + gl_saved_libs=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 +$as_echo_n "checking for library containing fdatasync... " >&6; } +if test "${ac_cv_search_fdatasync+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fdatasync (); +int +main () +{ +return fdatasync (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt posix4; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_fdatasync=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_fdatasync+set}" = set; then : + break +fi +done +if test "${ac_cv_search_fdatasync+set}" = set; then : + +else + ac_cv_search_fdatasync=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5 +$as_echo "$ac_cv_search_fdatasync" >&6; } +ac_res=$ac_cv_search_fdatasync +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_fdatasync" = "none required" || + LIB_FDATASYNC=$ac_cv_search_fdatasync +fi + + LIBS=$gl_saved_libs + fi + + if test $HAVE_FDATASYNC = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext" + + fi + + + + + + GNULIB_FDATASYNC=1 + + + + + + + + + ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " #include @@ -21622,6 +21713,37 @@ + + if test $ac_cv_func_fsync = no; then + HAVE_FSYNC=0 + fi + + if test $HAVE_FSYNC = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext" + + : + fi + + + + + + GNULIB_FSYNC=1 + + + + + + + # Persuade glibc to declare getloadavg(). @@ -26525,15 +26647,8 @@ LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" ## This is here because src/Makefile.in did some extra fiddling around - ## with LD_SWITCH_SYSTEM. The cpp logic was: - ## #ifndef LD_SWITCH_SYSTEM - ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) - ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: - ## not using gcc, darwin. - ## Because this was done in src/Makefile.in, the resulting part of - ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). - ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, - ## rather than LD_SWITCH_SYSTEM. + ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in + ## LD_SWITCH_SYSTEM_TEMACS instead, test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" ;; ------------------------------------------------------------ revno: 112041 committer: Daniel Colascione branch nick: trunk timestamp: Wed 2013-03-13 11:28:50 -0800 message: * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds too so that these builds can use Cygwin's file conversion functions. (We've been building and linking cygw32.o all along and just not using it.) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-13 18:42:22 +0000 +++ src/ChangeLog 2013-03-13 19:28:50 +0000 @@ -1,3 +1,10 @@ +2013-03-13 Daniel Colascione + + * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds + too so that these builds can use Cygwin's file conversion + functions. (We've been building and linking cygw32.o all along + and just not using it.) + 2013-03-13 Paul Eggert File synchronization fixes (Bug#13944). === modified file 'src/emacs.c' --- src/emacs.c 2013-02-25 05:55:37 +0000 +++ src/emacs.c 2013-03-13 19:28:50 +0000 @@ -44,7 +44,7 @@ #include "w32common.h" #endif -#if defined HAVE_NTGUI && defined CYGWIN +#if defined CYGWIN #include "cygw32.h" #endif @@ -1348,7 +1348,7 @@ #ifdef WINDOWSNT syms_of_ntproc (); #endif /* WINDOWSNT */ -#if defined CYGWIN && defined HAVE_NTGUI +#if defined CYGWIN syms_of_cygw32 (); #endif syms_of_window ();