diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-16 14:19:55 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-16 14:19:55 -0700 |
commit | 4847e3f0a94e3f24b40b060af528cf4b51d788c5 (patch) | |
tree | f5ceb65d02330ad2025cba4349165cdfe2124143 | |
parent | 1c8e352f7e4291ab523996e7c5feaedfe0f4b350 (diff) | |
parent | 0cca0a78a4ee6b761c2fd91ee5a6628f23e3368c (diff) | |
download | emacs-4847e3f0a94e3f24b40b060af528cf4b51d788c5.tar.gz emacs-4847e3f0a94e3f24b40b060af528cf4b51d788c5.tar.bz2 emacs-4847e3f0a94e3f24b40b060af528cf4b51d788c5.zip |
Merge from trunk.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | autogen/Makefile.in | 36 | ||||
-rwxr-xr-x | autogen/configure | 440 | ||||
-rw-r--r-- | configure.in | 15 | ||||
-rw-r--r-- | lisp/ChangeLog | 16 | ||||
-rw-r--r-- | lisp/gnus/ChangeLog | 14 | ||||
-rw-r--r-- | lisp/gnus/auth-source.el | 148 | ||||
-rw-r--r-- | lisp/window.el | 83 |
8 files changed, 454 insertions, 303 deletions
diff --git a/ChangeLog b/ChangeLog index f9d1c974359..97952924005 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-06-16 Miles Bader <miles@gnu.org> + + * configure.in: Try to determine CRT_DIR automatically when + using gcc. + 2011-06-15 Paul Eggert <eggert@cs.ucla.edu> * lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: diff --git a/autogen/Makefile.in b/autogen/Makefile.in index 225fe879f19..1d80f95190e 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in @@ -81,11 +81,12 @@ AR = ar ARFLAGS = cru libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = -am__libgnu_a_SOURCES_DIST = allocator.c careadlinkat.c dtoastr.c \ - gettext.h +am__libgnu_a_SOURCES_DIST = allocator.c careadlinkat.c md5.c sha1.c \ + dtoastr.c filemode.c gettext.h strftime.c am__objects_1 = am_libgnu_a_OBJECTS = allocator.$(OBJEXT) careadlinkat.$(OBJEXT) \ - dtoastr.$(OBJEXT) $(am__objects_1) + md5.$(OBJEXT) sha1.$(OBJEXT) dtoastr.$(OBJEXT) \ + filemode.$(OBJEXT) $(am__objects_1) strftime.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -733,15 +734,15 @@ BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) inttypes.h \ $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ stdlib.h sys/stat.h time.h unistd.h warn-on-use.h EXTRA_DIST = allocator.h $(top_srcdir)/./arg-nonnull.h \ - $(top_srcdir)/./c++defs.h careadlinkat.h md5.c md5.h sha1.c \ - sha1.h dosname.h ftoastr.c ftoastr.h filemode.c filemode.h \ - getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \ - ignore-value.h intprops.h inttypes.in.h lstat.c \ - mktime-internal.h mktime.c readlink.c stat.c stdarg.in.h \ - stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \ - strftime.c strftime.h strtol.c strtoul.c strtoull.c \ - strtoimax.c strtoumax.c symlink.c sys_stat.in.h time.in.h \ - time_r.c unistd.in.h verify.h $(top_srcdir)/./warn-on-use.h + $(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h \ + dosname.h ftoastr.c ftoastr.h filemode.h getloadavg.c getopt.c \ + getopt.in.h getopt1.c getopt_int.h ignore-value.h intprops.h \ + inttypes.in.h lstat.c mktime-internal.h mktime.c readlink.c \ + stat.c stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h \ + stdio.in.h stdlib.in.h strftime.h strtol.c strtoul.c \ + strtoull.c strtoimax.c strtoumax.c symlink.c sys_stat.in.h \ + time.in.h time_r.c unistd.in.h verify.h \ + $(top_srcdir)/./warn-on-use.h MOSTLYCLEANDIRS = sys MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ c++defs.h c++defs.h-t getopt.h getopt.h-t inttypes.h \ @@ -751,14 +752,13 @@ MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t noinst_LIBRARIES = libgnu.a DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src -libgnu_a_SOURCES = allocator.c careadlinkat.c dtoastr.c \ - $(am__append_1) +libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c dtoastr.c \ + filemode.c $(am__append_1) strftime.c libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) -EXTRA_libgnu_a_SOURCES = md5.c sha1.c ftoastr.c filemode.c \ - getloadavg.c getopt.c getopt1.c lstat.c mktime.c readlink.c \ - stat.c strftime.c strtol.c strtoul.c strtoull.c strtoimax.c \ - strtoumax.c symlink.c time_r.c +EXTRA_libgnu_a_SOURCES = ftoastr.c getloadavg.c getopt.c getopt1.c \ + lstat.c mktime.c readlink.c stat.c strtol.c strtoul.c \ + strtoull.c strtoimax.c strtoumax.c symlink.c time_r.c ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h WARN_ON_USE_H = warn-on-use.h diff --git a/autogen/configure b/autogen/configure index e4a96f2b2d7..f419c9117ed 100755 --- a/autogen/configure +++ b/autogen/configure @@ -14975,60 +14975,41 @@ $as_echo "$gl_cv_func_getopt_gnu" >&6; } fi fi -ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV $ac_have_decl -_ACEOF + REPLACE_GETOPT=0 if test -n "$gl_replace_getopt"; then : + REPLACE_GETOPT=1 - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - GNULIB_UNISTD_H_GETOPT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - - - - - - - +fi - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + if test $REPLACE_GETOPT = 1; then + GETOPT_H=getopt.h +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + GNULIB_UNISTD_H_GETOPT=1 + fi +ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_getenv" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV $ac_have_decl +_ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 @@ -16034,21 +16015,16 @@ $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file - echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - # When cross-compiling, be pessimistic so we will end up using the - # replacement version of lstat that checks for trailing slashes and - # calls lstat a second time when necessary. - ac_cv_func_lstat_dereferences_slashed_symlink=no - +echo >conftest.file +if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then + if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16057,11 +16033,10 @@ int main () { struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - + /* Linux will dereference the symlink and fail, as required by POSIX. + That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } @@ -16075,23 +16050,25 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no - fi - rm -f conftest.sym conftest.file +else + # If the `ln -s' command failed, then we probably don't even + # have an lstat function. + ac_cv_func_lstat_dereferences_slashed_symlink=no +fi +rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } - test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && + +test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF - if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then + +if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -16102,7 +16079,7 @@ _ACEOF gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" - fi +fi GNULIB_MKTIME=0; @@ -16678,33 +16655,11 @@ fi - - - - - - - gl_LIBOBJS="$gl_LIBOBJS md5.$ac_objext" - - - - : - - - - - - - gl_LIBOBJS="$gl_LIBOBJS sha1.$ac_objext" - - - - : @@ -16714,16 +16669,6 @@ fi - - - - - gl_LIBOBJS="$gl_LIBOBJS filemode.$ac_objext" - - - - - # Persuade glibc <stdlib.h> to declare getloadavg(). @@ -16731,6 +16676,7 @@ gl_save_LIBS=$LIBS # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. +HAVE_GETLOADAVG=1 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" if test "x$ac_cv_func_getloadavg" = x""yes; then : @@ -16917,6 +16863,51 @@ fi # Set up the replacement function if necessary. if test $gl_have_func = no; then + HAVE_GETLOADAVG=0 + fi +fi + + +if test "x$gl_save_LIBS" = x; then + GETLOADAVG_LIBS=$LIBS +else + GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` +fi +LIBS=$gl_save_LIBS + + +# Test whether the system declares getloadavg. Solaris has the function +# but declares it in <sys/loadavg.h>, not <stdlib.h>. +for ac_header in sys/loadavg.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_LOADAVG_H 1 +_ACEOF + +fi + +done + +if test $ac_cv_header_sys_loadavg_h = yes; then + HAVE_SYS_LOADAVG_H=1 +else + HAVE_SYS_LOADAVG_H=0 +fi +ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H + # include <sys/loadavg.h> + #endif + #include <stdlib.h> +" +if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : + +else + HAVE_DECL_GETLOADAVG=0 +fi + + +if test $HAVE_GETLOADAVG = 0; then @@ -17197,47 +17188,16 @@ fi done - fi fi -if test "x$gl_save_LIBS" = x; then - GETLOADAVG_LIBS=$LIBS -else - GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"` -fi -LIBS=$gl_save_LIBS -# Test whether the system declares getloadavg. Solaris has the function -# but declares it in <sys/loadavg.h>, not <stdlib.h>. -for ac_header in sys/loadavg.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_LOADAVG_H 1 -_ACEOF -fi + GNULIB_GETLOADAVG=1 -done -if test $ac_cv_header_sys_loadavg_h = yes; then - HAVE_SYS_LOADAVG_H=1 -else - HAVE_SYS_LOADAVG_H=0 -fi -ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H - # include <sys/loadavg.h> - #endif - #include <stdlib.h> -" -if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : -else - HAVE_DECL_GETLOADAVG=0 -fi @@ -17245,7 +17205,7 @@ fi - GNULIB_GETLOADAVG=1 +if test $REPLACE_GETOPT = 1; then @@ -17254,6 +17214,7 @@ fi + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" @@ -17262,9 +17223,29 @@ fi + + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + + + + +fi + + + + + + REPLACE_GETOPT=0 + + if test -n "$gl_replace_getopt"; then : + REPLACE_GETOPT=1 + +fi + + if test $REPLACE_GETOPT = 1; then GETOPT_H=getopt.h @@ -17272,7 +17253,10 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - GNULIB_UNISTD_H_GETOPT=1 + GNULIB_UNISTD_H_GETOPT=1 + fi + +if test $REPLACE_GETOPT = 1; then @@ -17296,27 +17280,37 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - fi - - if test $ac_cv_func_lstat = yes; then - if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then - REPLACE_LSTAT=1 + if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then + REPLACE_LSTAT=1 fi - # Prerequisites of lib/lstat.c. - else HAVE_LSTAT=0 fi +if test $REPLACE_LSTAT = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + + + + : + +fi @@ -17333,19 +17327,20 @@ fi -if test $APPLE_UNIVERSAL_BUILD = 1; then - # A universal build on Apple MacOS X platforms. - # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. - # But we need a configuration result that is valid in both modes. - ac_cv_func_working_mktime=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 + + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple MacOS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + gl_cv_func_working_mktime=no + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 $as_echo_n "checking for working mktime... " >&6; } -if test "${ac_cv_func_working_mktime+set}" = set; then : +if test "${gl_cv_func_working_mktime+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - ac_cv_func_working_mktime=no + gl_cv_func_working_mktime=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17542,69 +17537,57 @@ main () } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_working_mktime=yes + gl_cv_func_working_mktime=yes else - ac_cv_func_working_mktime=no + gl_cv_func_working_mktime=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 -$as_echo "$ac_cv_func_working_mktime" >&6; } -if test $ac_cv_func_working_mktime = no; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 +$as_echo "$gl_cv_func_working_mktime" >&6; } - if test $ac_cv_func_working_mktime = no; then + if test $gl_cv_func_working_mktime = no; then REPLACE_MKTIME=1 - - - else REPLACE_MKTIME=0 fi +if test $REPLACE_MKTIME = 1; then - GNULIB_MKTIME=1 + gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" +fi + - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 + GNULIB_MKTIME=1 - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - : + if test $ac_cv_func_readlink = no; then + HAVE_READLINK=0 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 $as_echo_n "checking whether readlink signature is correct... " >&6; } @@ -17675,18 +17658,12 @@ $as_echo "$gl_cv_func_readlink_works" >&6; } $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h REPLACE_READLINK=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - elif test "$gl_cv_decl_readlink_works" != yes; then REPLACE_READLINK=1 + fi + fi + +if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then @@ -17697,9 +17674,10 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - fi - fi + : + +fi @@ -18246,17 +18224,6 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; } - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext" - - # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. @@ -18276,31 +18243,30 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h if test "$ac_cv_have_decl_strtoumax" != yes; then HAVE_DECL_STRTOUMAX=0 + for ac_func in strtoumax +do : + ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" +if test "x$ac_cv_func_strtoumax" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOUMAX 1 +_ACEOF +fi +done + fi +if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then - for ac_func in strtoumax -do : - ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" -if test "x$ac_cv_func_strtoumax" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOUMAX 1 -_ACEOF - -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" -fi -done + gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" - if test $ac_cv_func_strtoumax = no; then ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" if test "x$ac_cv_have_decl_strtoull" = x""yes; then : @@ -18315,9 +18281,7 @@ _ACEOF - fi - fi - +fi @@ -18333,16 +18297,6 @@ _ACEOF if test $ac_cv_func_symlink = no; then HAVE_SYMLINK=0 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" - else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } @@ -18387,7 +18341,10 @@ fi $as_echo "$gl_cv_func_symlink_works" >&6; } if test "$gl_cv_func_symlink_works" != yes; then REPLACE_SYMLINK=1 + fi + fi +if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then @@ -18395,11 +18352,10 @@ $as_echo "$gl_cv_func_symlink_works" >&6; } - gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" - fi - fi + gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" +fi @@ -18553,7 +18509,8 @@ $as_echo "$gl_cv_time_r_posix" >&6; } else HAVE_LOCALTIME_R=0 fi - if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then + +if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then @@ -18567,8 +18524,7 @@ $as_echo "$gl_cv_time_r_posix" >&6; } : - fi - +fi @@ -18772,7 +18728,8 @@ $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h ;; esac - if test $REPLACE_STAT = 1; then + +if test $REPLACE_STAT = 1; then @@ -18784,8 +18741,10 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" - fi + : + +fi @@ -18810,15 +18769,7 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h if test "$ac_cv_type_unsigned_long_long_int" = yes; then - - - - - - - - - for ac_func in strtoull + for ac_func in strtoull do : ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" if test "x$ac_cv_func_strtoull" = x""yes; then : @@ -18826,22 +18777,29 @@ if test "x$ac_cv_func_strtoull" = x""yes; then : #define HAVE_STRTOULL 1 _ACEOF -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - fi done - if test $ac_cv_func_strtoull = no; then HAVE_STRTOULL=0 - - : - fi fi +if test $HAVE_STRTOULL = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" + + + : + +fi @@ -18862,7 +18820,7 @@ done gl_gnulib_enabled_verify=true fi } - if test $GNULIB_UNISTD_H_GETOPT = 1; then + if test $REPLACE_GETOPT = 1; then func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 fi if test $REPLACE_LSTAT = 1; then diff --git a/configure.in b/configure.in index 9e7ea8522b2..60b4d55be51 100644 --- a/configure.in +++ b/configure.in @@ -988,6 +988,21 @@ dnl Do this early because it can frob feature test macros for Unix-98 &c. AC_SYS_LARGEFILE +## If we're using gcc, and the user hasn't specified a crt-dir, try to +## determine it automatically by asking gcc. [If this doesn't work, +## CRT_DIR will remain empty and system-dependent code will be used +## below.] +## +if test "x${GCC}z$CRT_DIR" = xyesz; then + crt_file=`$CC 2>/dev/null --print-file-name=crt1.o` + case "$crt_file" in + */*) + CRT_DIR=`AS_DIRNAME(["$crt_file"])` + ;; + esac +fi + + ## If user specified a crt-dir, use that unconditionally. if test "X$CRT_DIR" = "X"; then diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d2d44793366..b5d76e3f533 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2011-06-16 Martin Rudalics <rudalics@gmx.at> + + * window.el (display-buffer-normalize-specifiers-1): Respect + current value of pop-up-frames for most reasonable values of + second argument of display-buffer (Bug#8865). + (switch-to-buffer-same-frame, switch-to-buffer-other-window) + (switch-to-buffer-other-window-same-frame) + (switch-to-buffer-other-frame): Fix doc-strings. Reported by Drew + Adams (Bug#8875). + (display-buffer): Don't check noninteractive when calling + display-buffer-pop-up-frame. + (display-buffer-pop-up-frame): Never pop up a frame in + noninteractive mode (Bug#8857). + (enlarge-window, shrink-window): Don't report an error when the + window can't be resized as requested (Bug#8862). + 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca> * pcmpl-rpm.el (pcomplete/rpm): Minor simplification. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2bfaf32f958..a160581d861 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,17 @@ +2011-06-16 Teodor Zlatanov <tzz@lifelogs.com> + + * auth-source.el (auth-source-save-secrets): New variable to control if + secret tokens should be saved encrypted. + (auth-source-netrc-parse, auth-source-netrc-search): Pass the file name + to `auth-source-netrc-normalize'. + (with-auth-source-epa-overrides): Add convenience macro. Don't depend + on the EPA variables being defined. + (auth-source-epa-make-gpg-token): Convert text to a "gpg:" token. + (auth-source-netrc-normalize): Convert "gpg:" tokens back to text in + the lexical-let closure. + (auth-source-netrc-create): Create "gpg:" tokens according to + `auth-source-save-secrets'. + 2011-06-10 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-group.el (gnus-group-update-group): Add new argument diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index e0bea324a25..40389bb7f72 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -154,6 +154,16 @@ let-binding." (const :tag "Never save" nil) (const :tag "Ask" ask))) +(defcustom auth-source-save-secrets nil + "If set, auth-source will respect it for password tokens behavior." + :group 'auth-source + :version "23.2" ;; No Gnus + :type `(choice + :tag "auth-source new password token behavior" + (const :tag "Use GPG tokens" gpg) + (const :tag "Save unencrypted" nil) + (const :tag "Ask" ask))) + (defvar auth-source-magic "auth-source-magic ") (defcustom auth-source-do-cache t @@ -898,7 +908,7 @@ Note that the MAX parameter is used so we can exit the parse early." (null require) ;; every element of require is in the normalized list (let ((normalized (nth 0 (auth-source-netrc-normalize - (list alist))))) + (list alist) file)))) (loop for req in require always (plist-get normalized req))))) (decf max) @@ -934,7 +944,54 @@ Note that the MAX parameter is used so we can exit the parse early." (nreverse result)))))) -(defun auth-source-netrc-normalize (alist) +(defmacro with-auth-source-epa-overrides (&rest body) + `(let ((file-name-handler-alist + ',(if (boundp 'epa-file-handler) + (remove (symbol-value 'epa-file-handler) + file-name-handler-alist) + file-name-handler-alist)) + (find-file-hook + ',(remove 'epa-file-find-file-hook find-file-hook)) + (auto-mode-alist + ',(if (boundp 'epa-file-auto-mode-alist-entry) + (remove (symbol-value 'epa-file-auto-mode-alist-entry) + auto-mode-alist) + auto-mode-alist))) + ,@body)) + +(defun auth-source-epa-make-gpg-token (secret file) + (require 'epa nil t) + (unless (featurep 'epa) + (error "EPA could not be loaded.")) + (let* ((base (file-name-sans-extension file)) + (passkey (format "gpg:-%s" base)) + (stash (concat base ".gpg")) + ;; temporarily disable EPA + (stashfile + (with-auth-source-epa-overrides + (make-temp-file "gpg-token" nil + stash))) + (epa-file-passphrase-alist + `((,stashfile + . ,(password-read + (format + "token pass for %s? " + file) + passkey))))) + (write-region secret nil stashfile) + ;; temporarily disable EPA + (unwind-protect + (with-auth-source-epa-overrides + (with-temp-buffer + (insert-file-contents stashfile) + (base64-encode-region (point-min) (point-max) t) + (concat "gpg:" + (buffer-substring-no-properties + (point-min) + (point-max))))) + (delete-file stashfile)))) + +(defun auth-source-netrc-normalize (alist filename) (mapcar (lambda (entry) (let (ret item) (while (setq item (pop entry)) @@ -950,15 +1007,65 @@ Note that the MAX parameter is used so we can exit the parse early." ;; send back the secret in a function (lexical binding) (when (equal k "secret") - (setq v (lexical-let ((v v)) - (lambda () v)))) - - (setq ret (plist-put ret - (intern (concat ":" k)) - v)) - )) - ret)) - alist)) + (setq v (lexical-let ((v v) + (filename filename) + (base (file-name-nondirectory + filename)) + (token-decoder nil) + (gpgdata nil) + (stash nil)) + (setq stash (concat base ".gpg")) + (when (string-match "gpg:\\(.+\\)" v) + (require 'epa nil t) + (unless (featurep 'epa) + (error "EPA could not be loaded.")) + (setq gpgdata (base64-decode-string + (match-string 1 v))) + ;; it's a GPG token + (setq + token-decoder + (lambda (gpgdata) +;;; FIXME: this relies on .gpg files being handled by EPA/EPG + (let* ((passkey (format "gpg:-%s" base)) + ;; temporarily disable EPA + (stashfile + (with-auth-source-epa-overrides + (make-temp-file "gpg-token" nil + stash))) + (epa-file-passphrase-alist + `((,stashfile + . ,(password-read + (format + "token pass for %s? " + filename) + passkey))))) + (unwind-protect + (progn + ;; temporarily disable EPA + (with-auth-source-epa-overrides + (write-region gpgdata + nil + stashfile)) + (setq + v + (with-temp-buffer + (insert-file-contents stashfile) + (buffer-substring-no-properties + (point-min) + (point-max))))) + (delete-file stashfile))) + ;; clear out the decoder at end + (setq token-decoder nil + gpgdata nil)))) + (lambda () + (when token-decoder + (funcall token-decoder gpgdata)) + v)))) + (setq ret (plist-put ret + (intern (concat ":" k)) + v)))) + ret)) + alist)) ;;; (setq secret (plist-get (nth 0 (auth-source-search :host t :type 'netrc :K 1 :max 1)) :secret)) ;;; (funcall secret) @@ -982,7 +1089,8 @@ See `auth-source-search' for details on SPEC." :file (oref backend source) :host (or host t) :user (or user t) - :port (or port t))))) + :port (or port t)) + (oref backend source)))) ;; if we need to create an entry AND none were found to match (when (and create @@ -1098,7 +1206,21 @@ See `auth-source-search' for details on SPEC." (cond ((and (null data) (eq r 'secret)) ;; Special case prompt for passwords. - (read-passwd prompt)) + ;; Respect `auth-source-save-secrets' + (let* ((ep (format "Do you want GPG password tokens? (%s)" + "see `auth-source-save-secrets'")) + (gpg-encrypt +;;; FIXME: this relies on .gpg files being handled by EPA/EPG + ;; don't put GPG tokens in GPG-encrypted files + (and (not (equal "gpg" (file-name-extension file))) + (or (eq auth-source-save-secrets 'gpg) + (and (eq auth-source-save-secrets 'ask) + (setq auth-source-save-secrets + (and (y-or-n-p ep) 'gpg)))))) + (plain (read-passwd prompt))) + (if (eq auth-source-save-secrets 'gpg) + (auth-source-epa-make-gpg-token plain file) + plain))) ((null data) (when default (setq prompt diff --git a/lisp/window.el b/lisp/window.el index 5493893d4c1..aa874b8e503 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2044,7 +2044,18 @@ make selected window wider by DELTA columns. If DELTA is negative, shrink selected window by -DELTA lines or columns. Return nil." (interactive "p") - (resize-window (selected-window) delta horizontal)) + (cond + ((zerop delta)) + ((window-size-fixed-p nil horizontal) + (error "Selected window has fixed size")) + ((window-resizable-p nil delta horizontal) + (resize-window nil delta horizontal)) + (t + (resize-window + nil (if (> delta 0) + (window-max-delta nil horizontal) + (- (window-min-delta nil horizontal))) + horizontal)))) (defun shrink-window (delta &optional horizontal) "Make selected window DELTA lines smaller. @@ -2054,7 +2065,18 @@ make selected window narrower by DELTA columns. If DELTA is negative, enlarge selected window by -DELTA lines or columns. Return nil." (interactive "p") - (resize-window (selected-window) (- delta) horizontal)) + (cond + ((zerop delta)) + ((window-size-fixed-p nil horizontal) + (error "Selected window has fixed size")) + ((window-resizable-p nil (- delta) horizontal) + (resize-window nil (- delta) horizontal)) + (t + (resize-window + nil (if (> delta 0) + (- (window-min-delta nil horizontal)) + (window-max-delta nil horizontal)) + horizontal)))) (defun maximize-window (&optional window) "Maximize WINDOW. @@ -3453,9 +3475,8 @@ specific buffers." ;; (bw-finetune wins) ;; (message "Done in %d rounds" round) )) - - +;;; Displaying buffers. (defconst display-buffer-default-specifiers '((reuse-window nil same visible) (pop-up-window (largest . nil) (lru . nil)) @@ -4705,7 +4726,8 @@ non-nil means to make a new frame on graphic displays only. SPECIFIERS must be a list of buffer display specifiers, see the documentation of `display-buffer-alist' for a description." - (unless (and graphic-only (not (display-graphic-p))) + (unless (or (and graphic-only (not (display-graphic-p))) + noninteractive) (let* ((selected-window (selected-window)) (function (or (cdr (assq 'pop-up-frame-function specifiers)) 'make-frame)) @@ -4909,9 +4931,12 @@ BUFFER-OR-NAME and return that buffer." (defun display-buffer-normalize-specifiers-1 (specifiers) "Subroutine of `display-buffer-normalize-specifiers'. SPECIFIERS is the SPECIFIERS argument of `display-buffer'." - (let (normalized) + (let (normalized entry) (cond + ((not specifiers) + nil) ((listp specifiers) + ;; If SPECIFIERS is a list, we assume it is a list of specifiers. (dolist (specifier specifiers) (cond ((consp specifier) @@ -4924,21 +4949,17 @@ SPECIFIERS is the SPECIFIERS argument of `display-buffer'." (dolist (item (cdr entry)) (setq normalized (cons item normalized))))))) ;; Reverse list. - (setq normalized (nreverse normalized))) - ;; The two cases below must come from the SPECIFIERS argument of - ;; `display-buffer'. - ((eq specifiers 't) - ;; Historically t means "other window". Eventually we should get - ;; rid of this. - (setq normalized - (cdr (assq 'other-window display-buffer-macro-specifiers)) - normalized)) - ((symbolp specifiers) - ;; We allow scalar specifiers in calls of `display-buffer'. - (let ((entry (assq specifiers display-buffer-macro-specifiers))) - (when entry (setq normalized (cdr entry)))))) - - normalized)) + (nreverse normalized)) + ((and (not (eq specifiers 'other-window)) + (setq entry (assq specifiers display-buffer-macro-specifiers))) + ;; A macro specifier. + (cdr entry)) + ((with-no-warnings (memq pop-up-frames '(nil unset))) + ;; Pop up a new window. + (cdr (assq 'other-window display-buffer-macro-specifiers))) + (t + ;; Pop up a new frame. + (cdr (assq 'other-frame display-buffer-macro-specifiers)))))) (defun display-buffer-normalize-specifiers-2 (&optional buffer-or-name) "Subroutine of `display-buffer-normalize-specifiers'. @@ -5301,8 +5322,8 @@ this list as arguments." ;; Try reusing a window not showing BUFFER on any visible or ;; iconified frame. (display-buffer-reuse-window buffer '(nil other 0)) - ;; Try making a new frame (but not in batch mode). - (and (not noninteractive) (display-buffer-pop-up-frame buffer)) + ;; Try making a new frame. + (display-buffer-pop-up-frame buffer) ;; Try using a weakly dedicated window. (display-buffer-reuse-window buffer '(nil nil t) '((reuse-window-dedicated . weak))) @@ -5513,8 +5534,8 @@ functions should call `pop-to-buffer-same-window' instead." (defun switch-to-buffer-same-frame (buffer-or-name &optional norecord) "Switch to buffer BUFFER-OR-NAME in a window on the selected frame. Another frame will be used only if there is no other choice. -Optional arguments BUFFER-OR-NAME and NORECORD have the same -meaning as for `switch-to-buffer'. +Arguments BUFFER-OR-NAME and NORECORD have the same meaning as +for `switch-to-buffer'. This function is intended for interactive use only. Lisp functions should call `pop-to-buffer-same-frame' instead." @@ -5527,8 +5548,8 @@ functions should call `pop-to-buffer-same-frame' instead." "Switch to buffer BUFFER-OR-NAME in another window. The selected window will be used only if there is no other choice. Windows on the selected frame are preferred to windows -on other frames. Optional arguments BUFFER-OR-NAME and NORECORD -have the same meaning as for `switch-to-buffer'. +on other frames. Arguments BUFFER-OR-NAME and NORECORD have the +same meaning as for `switch-to-buffer'. This function is intended for interactive use only. Lisp functions should call `pop-to-buffer-other-window' instead." @@ -5540,8 +5561,8 @@ functions should call `pop-to-buffer-other-window' instead." (defun switch-to-buffer-other-window-same-frame (buffer-or-name &optional norecord) "Switch to buffer BUFFER-OR-NAME in another window on the selected frame. The selected window or another frame will be used only if there -is no other choice. Optional arguments BUFFER-OR-NAME and -NORECORD have the same meaning as for `switch-to-buffer'. +is no other choice. Arguments BUFFER-OR-NAME and NORECORD have +the same meaning as for `switch-to-buffer'. This function is intended for interactive use only. Lisp functions should call `pop-to-buffer-other-window-same-frame' @@ -5554,8 +5575,8 @@ instead." (defun switch-to-buffer-other-frame (buffer-or-name &optional norecord) "Switch to buffer BUFFER-OR-NAME on another frame. The same frame will be used only if there is no other choice. -Optional arguments BUFFER-OR-NAME and NORECORD have the same -meaning as for `switch-to-buffer'. +Arguments BUFFER-OR-NAME and NORECORD have the same meaning +as for `switch-to-buffer'. This function is intended for interactive use only. Lisp functions should call `pop-to-buffer-other-frame' instead." |