Now on revision 108930. ------------------------------------------------------------ revno: 108930 fixes bug(s): http://debbugs.gnu.org/11781 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 20:06:00 -0700 message: * sysdep.c (ULLONG_MAX): Define if not already defined. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-07 02:25:28 +0000 +++ src/ChangeLog 2012-07-07 03:06:00 +0000 @@ -1,5 +1,7 @@ 2012-07-07 Paul Eggert + * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781). + * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797). Do not require float-time's arg to fit in time_t (Bug#11825). === modified file 'src/sysdep.c' --- src/sysdep.c 2012-07-07 02:25:28 +0000 +++ src/sysdep.c 2012-07-07 03:06:00 +0000 @@ -108,6 +108,11 @@ static _Noreturn void croak (char *); #endif +/* ULLONG_MAX is missing on Red Hat Linux 7.3; see Bug#11781. */ +#ifndef ULLONG_MAX +#define ULLONG_MAX TYPE_MAXIMUM (unsigned long long int) +#endif + /* Declare here, including term.h is problematic on some systems. */ extern void tputs (const char *, int, int (*)(int)); ------------------------------------------------------------ revno: 108929 fixes bug(s): http://debbugs.gnu.org/11797 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 19:25:28 -0700 message: * sysdep.c (list_system_processes): Port to NetBSD-current. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-07 01:57:42 +0000 +++ src/ChangeLog 2012-07-07 02:25:28 +0000 @@ -1,5 +1,7 @@ 2012-07-07 Paul Eggert + * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797). + Do not require float-time's arg to fit in time_t (Bug#11825). This works better on hosts where time_t is unsigned, and where float-time is applied to the (negative) difference between two times. === modified file 'src/sysdep.c' --- src/sysdep.c 2012-07-06 03:08:57 +0000 +++ src/sysdep.c 2012-07-07 02:25:28 +0000 @@ -2520,7 +2520,7 @@ Lisp_Object list_system_processes (void) { -#if defined DARWIN_OS || defined __OpenBSD__ +#if defined DARWIN_OS || defined __NetBSD__ || defined __OpenBSD__ int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL}; #else int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC}; @@ -2546,7 +2546,7 @@ len /= sizeof (struct kinfo_proc); for (i = 0; i < len; i++) { -#ifdef DARWIN_OS +#if defined DARWIN_OS || defined __NetBSD__ proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist); #elif defined __OpenBSD__ proclist = Fcons (make_fixnum_or_float (procs[i].p_pid), proclist); ------------------------------------------------------------ revno: 108928 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 18:57:42 -0700 message: Do not require float-time's arg to fit in time_t (Bug#11825). This works better on hosts where time_t is unsigned, and where float-time is applied to the (negative) difference between two times. * editfns.c (decode_time_components): Last arg is now double *, not int *, and means to store all the result as a double, without worrying about whether the seconds part fits in time_t. All callers changed. (lisp_time_argument): Remove last int * arg, as it's no longer needed. All callers changed. (Ffloat_time): Do not fail merely because the specified time falls outside of time_t range. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-07 01:03:46 +0000 +++ src/ChangeLog 2012-07-07 01:57:42 +0000 @@ -1,3 +1,17 @@ +2012-07-07 Paul Eggert + + Do not require float-time's arg to fit in time_t (Bug#11825). + This works better on hosts where time_t is unsigned, and where + float-time is applied to the (negative) difference between two times. + * editfns.c (decode_time_components): Last arg is now double *, + not int *, and means to store all the result as a double, without + worrying about whether the seconds part fits in time_t. + All callers changed. + (lisp_time_argument): Remove last int * arg, as it's no longer needed. + All callers changed. + (Ffloat_time): Do not fail merely because the specified time falls + outside of time_t range. + 2012-07-07 Glenn Morris * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV): === modified file 'src/editfns.c' --- src/editfns.c 2012-07-06 05:07:44 +0000 +++ src/editfns.c 2012-07-07 01:57:42 +0000 @@ -1521,16 +1521,20 @@ } /* From the time components HIGH, LOW, USEC and PSEC taken from a Lisp - list, generate the corresponding EMACS_TIME value *RESULT, and - if RESULT_PSEC is not null store into *RESULT_PSEC the - (nonnegative) difference in picoseconds between the input time and - the returned time. Return nonzero if successful. */ + list, generate the corresponding time value. + + If RESULT is not null, store into *RESULT the converted time; + this can fail if the converted time does not fit into EMACS_TIME. + If *DRESULT is not null, store into *DRESULT the number of + seconds since the start of the POSIX Epoch. + + Return nonzero if successful. */ int decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec, - Lisp_Object psec, EMACS_TIME *result, int *result_psec) + Lisp_Object psec, + EMACS_TIME *result, double *dresult) { EMACS_INT hi, lo, us, ps; - time_t sec; if (! (INTEGERP (high) && INTEGERP (low) && INTEGERP (usec) && INTEGERP (psec))) return 0; @@ -1548,27 +1552,38 @@ us = us % 1000000 + 1000000 * (us % 1000000 < 0); lo &= (1 << 16) - 1; - /* Check for overflow in the highest-order component. */ - if (! ((TYPE_SIGNED (time_t) ? TIME_T_MIN >> 16 <= hi : 0 <= hi) - && hi <= TIME_T_MAX >> 16)) - return 0; - - sec = hi; - EMACS_SET_SECS_NSECS (*result, (sec << 16) + lo, us * 1000 + ps / 1000); - if (result_psec) - *result_psec = ps % 1000; + if (result) + { + if ((TYPE_SIGNED (time_t) ? TIME_T_MIN >> 16 <= hi : 0 <= hi) + && hi <= TIME_T_MAX >> 16) + { + /* Return the greatest representable time that is not greater + than the requested time. */ + time_t sec = hi; + EMACS_SET_SECS_NSECS (*result, (sec << 16) + lo, + us * 1000 + ps / 1000); + } + else + { + /* Overflow in the highest-order component. */ + return 0; + } + } + + if (dresult) + *dresult = (us * 1e6 + ps) / 1e12 + lo + hi * 65536.0; + return 1; } /* Decode a Lisp list SPECIFIED_TIME that represents a time. If SPECIFIED_TIME is nil, use the current time. - Round the time down to the nearest EMACS_TIME value, and - if PPSEC is not null store into *PPSEC the (nonnegative) difference in - picoseconds between the input time and the returned time. + + Round the time down to the nearest EMACS_TIME value. Return seconds since the Epoch. Signal an error if unsuccessful. */ EMACS_TIME -lisp_time_argument (Lisp_Object specified_time, int *ppsec) +lisp_time_argument (Lisp_Object specified_time) { EMACS_TIME t; if (NILP (specified_time)) @@ -1577,14 +1592,15 @@ { Lisp_Object high, low, usec, psec; if (! (disassemble_lisp_time (specified_time, &high, &low, &usec, &psec) - && decode_time_components (high, low, usec, psec, &t, ppsec))) + && decode_time_components (high, low, usec, psec, &t, 0))) error ("Invalid time specification"); } return t; } /* Like lisp_time_argument, except decode only the seconds part, - and do not check the subseconds part, and always round down. */ + do not allow out-of-range time stamps, do not check the subseconds part, + and always round down. */ static time_t lisp_seconds_argument (Lisp_Object specified_time) { @@ -1616,12 +1632,21 @@ or (if you need time as a string) `format-time-string'. */) (Lisp_Object specified_time) { - int psec; - EMACS_TIME t = lisp_time_argument (specified_time, &psec); - double ps = (1000 * 1000 * 1000 <= INTMAX_MAX / 1000 - ? EMACS_NSECS (t) * (intmax_t) 1000 + psec - : EMACS_NSECS (t) * 1e3 + psec); - return make_float (EMACS_SECS (t) + ps / 1e12); + double t; + if (NILP (specified_time)) + { + EMACS_TIME now; + EMACS_GET_TIME (now); + t = EMACS_SECS (now) + EMACS_NSECS (now) / 1e9; + } + else + { + Lisp_Object high, low, usec, psec; + if (! (disassemble_lisp_time (specified_time, &high, &low, &usec, &psec) + && decode_time_components (high, low, usec, psec, 0, &t))) + error ("Invalid time specification"); + } + return make_float (t); } /* Write information into buffer S of size MAXSIZE, according to the @@ -1730,7 +1755,7 @@ usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */) (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal) { - EMACS_TIME t = lisp_time_argument (timeval, 0); + EMACS_TIME t = lisp_time_argument (timeval); struct tm tm; CHECK_STRING (format_string); === modified file 'src/fileio.c' --- src/fileio.c 2012-07-05 18:35:48 +0000 +++ src/fileio.c 2012-07-07 01:57:42 +0000 @@ -3031,7 +3031,7 @@ { Lisp_Object absname, encoded_absname; Lisp_Object handler; - EMACS_TIME t = lisp_time_argument (timestamp, 0); + EMACS_TIME t = lisp_time_argument (timestamp); absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); @@ -5159,7 +5159,7 @@ { if (!NILP (time_list)) { - current_buffer->modtime = lisp_time_argument (time_list, 0); + current_buffer->modtime = lisp_time_argument (time_list); current_buffer->modtime_size = -1; } else === modified file 'src/systime.h' --- src/systime.h 2012-06-24 17:21:20 +0000 +++ src/systime.h 2012-07-07 01:57:42 +0000 @@ -112,8 +112,8 @@ /* defined in editfns.c */ extern Lisp_Object make_lisp_time (EMACS_TIME); extern int decode_time_components (Lisp_Object, Lisp_Object, Lisp_Object, - Lisp_Object, EMACS_TIME *, int *); -extern EMACS_TIME lisp_time_argument (Lisp_Object, int *); + Lisp_Object, EMACS_TIME *, double *); +extern EMACS_TIME lisp_time_argument (Lisp_Object); #endif /* Compare times T1 and T2 for equality, inequality etc. */ === modified file 'src/undo.c' --- src/undo.c 2012-06-24 17:39:14 +0000 +++ src/undo.c 2012-07-07 01:57:42 +0000 @@ -521,7 +521,7 @@ (mod_time, 0, XINT (XCAR (XCDR (XCDR (XCDR (cdr))))) / 1000); else - mod_time = lisp_time_argument (cdr, 0); + mod_time = lisp_time_argument (cdr); if (current_buffer->base_buffer) base_buffer = current_buffer->base_buffer; ------------------------------------------------------------ revno: 108927 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 21:03:46 -0400 message: Replace some src/s undefs by never even checking on relevant platforms * configure.in: (getwd): Don't check for it on unixware. (random, rint): Don't check for these on hpux. (res_init, libresolv): Don't check for these on darwin. * src/s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV): * src/s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM): * src/s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively). diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-07 00:20:56 +0000 +++ ChangeLog 2012-07-07 01:03:46 +0000 @@ -1,3 +1,11 @@ +2012-07-07 Glenn Morris + + * configure.in: Rather than checking for things then undef'ing + them on some platforms, simply don't check for them. + (getwd): Don't check for it on unixware. + (random, rint): Don't check for these on hpux. + (res_init, libresolv): Don't check for these on darwin. + 2012-07-07 Juanma Barranquero * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/c-ctype.$(O), === modified file 'configure.in' --- configure.in 2012-07-06 21:29:50 +0000 +++ configure.in 2012-07-07 01:03:46 +0000 @@ -2700,9 +2700,9 @@ AC_CHECK_FUNCS(gethostname \ rename closedir mkdir rmdir getrusage get_current_dir_name \ -random lrand48 logb frexp fmod rint cbrt setsid \ +lrand48 logb frexp fmod cbrt setsid \ strerror fpathconf select euidaccess getpagesize setlocale \ -utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ +utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ __fpending strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ gai_strerror mkstemp getline getdelim fsync sync \ @@ -2711,6 +2711,22 @@ touchlock \ cfmakeraw cfsetspeed copysign __executable_start) +dnl getwd appears to be buggy on SVR4.2, so we don't use it. +if test $opsys != unixware; then + AC_CHECK_FUNCS(getwd) +fi + +## Eric Backus says, HP-UX 9.x on HP 700 machines +## has a broken `rint' in some library versions including math library +## version number A.09.05. +## You can fix the math library by installing patch number PHSS_4630. +## But we can fix it more reliably for Emacs by just not using rint. +## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h. +case $opsys in + hpux*) : ;; + *) AC_CHECK_FUNCS(random rint) ;; +esac + dnl Cannot use AC_CHECK_FUNCS AC_CACHE_CHECK([for __builtin_unwind_init], emacs_cv_func___builtin_unwind_init, @@ -2847,33 +2863,40 @@ # Do we have res_init, for detecting changes in /etc/resolv.conf? +# On Darwin, res_init appears not to be useful: see bug#562 and +# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html resolv=no -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -#include -#include ]], - [[return res_init();]])], - have_res_init=yes, have_res_init=no) -if test "$have_res_init" = no; then - OLIBS="$LIBS" - LIBS="$LIBS -lresolv" - AC_MSG_CHECKING(for res_init with -lresolv) + +if test $opsys != darwin; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include #include ]], [[return res_init();]])], have_res_init=yes, have_res_init=no) - AC_MSG_RESULT($have_res_init) - if test "$have_res_init" = yes ; then - resolv=yes + if test "$have_res_init" = no; then + OLIBS="$LIBS" + LIBS="$LIBS -lresolv" + AC_MSG_CHECKING(for res_init with -lresolv) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include +#include ]], + [[return res_init();]])], + have_res_init=yes, have_res_init=no) + AC_MSG_RESULT($have_res_init) + if test "$have_res_init" = yes ; then + resolv=yes + fi + LIBS="$OLIBS" fi - LIBS="$OLIBS" -fi -if test "$have_res_init" = yes; then - AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.]) -fi + if test "$have_res_init" = yes; then + AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.]) + fi +fi dnl !darwin # Do we need the Hesiod library to provide the support routines? +dnl FIXME? Should we be skipping this on Darwin too? LIBHESIOD= if test "$with_hesiod" != no ; then # Don't set $LIBS here -- see comments above. FIXME which comments? @@ -2897,7 +2920,7 @@ AC_SUBST(LIBHESIOD) # Do we need libresolv (due to res_init or Hesiod)? -if test "$resolv" = yes ; then +if test "$resolv" = yes && test $opsys != darwin; then AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the resolv library (-lresolv).]) LIBRESOLV=-lresolv === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-07 00:20:56 +0000 +++ src/ChangeLog 2012-07-07 01:03:46 +0000 @@ -1,3 +1,9 @@ +2012-07-07 Glenn Morris + + * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV): + * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM): + * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively). + 2012-07-07 Juanma Barranquero * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)): === modified file 'src/s/darwin.h' --- src/s/darwin.h 2012-06-12 17:43:09 +0000 +++ src/s/darwin.h 2012-07-07 01:03:46 +0000 @@ -106,11 +106,6 @@ #define SYSTEM_PURESIZE_EXTRA 200000 #endif -/* On Darwin, res_init appears not to be useful: see bug#562 and - http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html */ -#undef HAVE_RES_INIT -#undef HAVE_LIBRESOLV - #ifdef emacs #define malloc unexec_malloc #define realloc unexec_realloc === modified file 'src/s/hpux10-20.h' --- src/s/hpux10-20.h 2012-06-12 17:43:09 +0000 +++ src/s/hpux10-20.h 2012-07-07 01:03:46 +0000 @@ -61,23 +61,14 @@ HP-UX 10.20, and that it works for HP-UX 0 as well. */ #define NO_EDITRES -/* Eric Backus says, HP-UX 9.x on HP 700 machines - has a broken `rint' in some library versions including math library - version number A.09.05. - - You can fix the math library by installing patch number PHSS_4630. - But we can fix it more reliably for Emacs like this. */ -#undef HAVE_RINT - /* We have to go this route, rather than hpux9's approach of renaming the functions via macros. The system's stdlib.h has fully prototyped declarations, which yields a conflicting definition of srand48; it tries to redeclare what was once srandom to be srand48. So we go - with HAVE_LRAND48 being defined. */ + with HAVE_LRAND48 being defined. + Note we also undef HAVE_RANDOM via configure. */ #undef srandom #undef random -#undef HAVE_RANDOM - /* Rainer Malzbender says defining HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20 using GCC. */ === modified file 'src/s/unixware.h' --- src/s/unixware.h 2012-06-13 02:39:20 +0000 +++ src/s/unixware.h 2012-07-07 01:03:46 +0000 @@ -20,9 +20,6 @@ #include "usg5-4-common.h" -/* #define HAVE_GETWD (appears to be buggy on SVR4.2) */ -#undef HAVE_GETWD - /* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock rather than sighold/sigrelse, which appear to be BSD4.1 specific. It may also be appropriate for SVR4.x ------------------------------------------------------------ revno: 108926 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2012-07-07 02:20:56 +0200 message: Update Windows port to gnulib changes in revno:108922. * lib-src/makefile.w32-in ($(BLD)/ctags.$(O), $(BLD)/etags.$(O)): Update dependencies. * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/c-ctype.$(O), $(BLD)/c-strcasecmp.$(O) and $(BLD)/c-strncasecmp.$(O). ($(BLD)/c-ctype.$(O), $(BLD)/c-strcasecmp.$(O)) ($(BLD)/c-strncasecmp.$(O)): New dependencies. * src/makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)): Update dependencies. * src/s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-06 21:29:50 +0000 +++ ChangeLog 2012-07-07 00:20:56 +0000 @@ -1,3 +1,10 @@ +2012-07-07 Juanma Barranquero + + * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/c-ctype.$(O), + $(BLD)/c-strcasecmp.$(O) and $(BLD)/c-strncasecmp.$(O). + ($(BLD)/c-ctype.$(O), $(BLD)/c-strcasecmp.$(O)) + ($(BLD)/c-strncasecmp.$(O)): New dependencies. + 2012-07-06 Paul Eggert * configure.in: Document --enable-gcc-warnings better. === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-07-06 21:07:46 +0000 +++ lib-src/ChangeLog 2012-07-07 00:20:56 +0000 @@ -1,3 +1,8 @@ +2012-07-07 Juanma Barranquero + + * makefile.w32-in ($(BLD)/ctags.$(O), $(BLD)/etags.$(O)): + Update dependencies. + 2012-07-06 Paul Eggert Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2012-06-30 23:01:52 +0000 +++ lib-src/makefile.w32-in 2012-07-07 00:20:56 +0000 @@ -363,6 +363,7 @@ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/lib-src/../src/config.h \ $(SRC)/ntlib.h \ + $(EMACS_ROOT)/lib/c-strcase.h \ $(EMACS_ROOT)/lib/getopt.h $(BLD)/ebrowse.$(O) : \ @@ -384,6 +385,7 @@ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/lib-src/../src/config.h \ $(SRC)/ntlib.h \ + $(EMACS_ROOT)/lib/c-strcase.h \ $(EMACS_ROOT)/lib/getopt.h $(BLD)/hexl.$(O) : \ === modified file 'lib/makefile.w32-in' --- lib/makefile.w32-in 2012-06-26 16:57:54 +0000 +++ lib/makefile.w32-in 2012-07-07 00:20:56 +0000 @@ -23,7 +23,10 @@ LOCAL_FLAGS = -I. -I../nt/inc -I../src LIBS = -GNULIBOBJS = $(BLD)/dtoastr.$(O) \ +GNULIBOBJS = $(BLD)/c-ctype.$(O) \ + $(BLD)/c-strcasecmp.$(O) \ + $(BLD)/c-strncasecmp.$(O) \ + $(BLD)/dtoastr.$(O) \ $(BLD)/dtotimespec.$(O) \ $(BLD)/getopt.$(O) \ $(BLD)/getopt1.$(O) \ @@ -64,6 +67,26 @@ EMACS_ROOT = .. SRC = . +$(BLD)/c-ctype.$(O) : \ + $(SRC)/c-ctype.c \ + $(SRC)/c-ctype.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/config.h + +$(BLD)/c-strcasecmp.$(O) : \ + $(SRC)/c-strcasecmp.c \ + $(SRC)/c-strcase.h \ + $(SRC)/c-ctype.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/config.h + +$(BLD)/c-strncasecmp.$(O) : \ + $(SRC)/c-strncasecmp.c \ + $(SRC)/c-strcase.h \ + $(SRC)/c-ctype.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/config.h + $(BLD)/dtoastr.$(O) : \ $(SRC)/dtoastr.c \ $(SRC)/ftoastr.c \ === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 21:07:46 +0000 +++ src/ChangeLog 2012-07-07 00:20:56 +0000 @@ -1,3 +1,10 @@ +2012-07-07 Juanma Barranquero + + * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)): + Update dependencies. + + * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp. + 2012-07-06 Paul Eggert Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-07-05 12:07:29 +0000 +++ src/makefile.w32-in 2012-07-07 00:20:56 +0000 @@ -412,6 +412,7 @@ W32GUI_H = $(SRC)/w32gui.h \ $(SYSTIME_H) DISPEXTERN_H = $(SRC)/dispextern.h \ + $(GNU_LIB)/c-strcase.h \ $(SYSTIME_H) \ $(W32GUI_H) FILEMODE_H = $(GNU_LIB)/filemode.h \ @@ -1269,7 +1270,6 @@ $(SRC)/category.h \ $(SRC)/regex.h \ $(SRC)/syntax.h \ - $(NT_INC)/unistd.h \ $(BUFFER_H) \ $(CHARACTER_H) \ $(CONFIG_H) \ === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2012-07-06 17:19:33 +0000 +++ src/s/ms-w32.h 2012-07-07 00:20:56 +0000 @@ -148,12 +148,6 @@ #define MAXPATHLEN _MAX_PATH #endif -/* MinGW has these in its library; MSVC doesn't. */ -#ifdef _MSC_VER -#define strcasecmp(s1,s2) _stricmp(s1,s2) -#define strncasecmp(s1,s2) _strnicmp(s1,s2) -#endif - #ifdef HAVE_NTGUI #define HAVE_WINDOW_SYSTEM 1 #define HAVE_MENUS 1 ------------------------------------------------------------ revno: 108925 fixes bug(s): http://debbugs.gnu.org/11786 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 15:19:44 -0700 message: Add gnulib files for Bug#11786 fix. diff: === added file 'lib/c-ctype.c' --- lib/c-ctype.c 1970-01-01 00:00:00 +0000 +++ lib/c-ctype.c 2012-07-06 22:19:44 +0000 @@ -0,0 +1,395 @@ +/* Character handling in C locale. + + Copyright 2000-2003, 2006, 2009-2012 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . */ + +#include + +/* Specification. */ +#define NO_C_CTYPE_MACROS +#include "c-ctype.h" + +/* The function isascii is not locale dependent. Its use in EBCDIC is + questionable. */ +bool +c_isascii (int c) +{ + return (c >= 0x00 && c <= 0x7f); +} + +bool +c_isalnum (int c) +{ +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII + return ((c >= '0' && c <= '9') + || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); +#else + return ((c >= '0' && c <= '9') + || (c >= 'A' && c <= 'Z') + || (c >= 'a' && c <= 'z')); +#endif +#else + switch (c) + { + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isalpha (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII + return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); +#else + return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); +#endif +#else + switch (c) + { + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isblank (int c) +{ + return (c == ' ' || c == '\t'); +} + +bool +c_iscntrl (int c) +{ +#if C_CTYPE_ASCII + return ((c & ~0x1f) == 0 || c == 0x7f); +#else + switch (c) + { + case ' ': case '!': case '"': case '#': case '$': case '%': + case '&': case '\'': case '(': case ')': case '*': case '+': + case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case '[': case '\\': case ']': case '^': case '_': case '`': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case '{': case '|': case '}': case '~': + return 0; + default: + return 1; + } +#endif +} + +bool +c_isdigit (int c) +{ +#if C_CTYPE_CONSECUTIVE_DIGITS + return (c >= '0' && c <= '9'); +#else + switch (c) + { + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + return 1; + default: + return 0; + } +#endif +} + +bool +c_islower (int c) +{ +#if C_CTYPE_CONSECUTIVE_LOWERCASE + return (c >= 'a' && c <= 'z'); +#else + switch (c) + { + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isgraph (int c) +{ +#if C_CTYPE_ASCII + return (c >= '!' && c <= '~'); +#else + switch (c) + { + case '!': case '"': case '#': case '$': case '%': case '&': + case '\'': case '(': case ')': case '*': case '+': case ',': + case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case '[': case '\\': case ']': case '^': case '_': case '`': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isprint (int c) +{ +#if C_CTYPE_ASCII + return (c >= ' ' && c <= '~'); +#else + switch (c) + { + case ' ': case '!': case '"': case '#': case '$': case '%': + case '&': case '\'': case '(': case ')': case '*': case '+': + case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case '[': case '\\': case ']': case '^': case '_': case '`': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +#endif +} + +bool +c_ispunct (int c) +{ +#if C_CTYPE_ASCII + return ((c >= '!' && c <= '~') + && !((c >= '0' && c <= '9') + || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); +#else + switch (c) + { + case '!': case '"': case '#': case '$': case '%': case '&': + case '\'': case '(': case ')': case '*': case '+': case ',': + case '-': case '.': case '/': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case '[': case '\\': case ']': case '^': case '_': case '`': + case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isspace (int c) +{ + return (c == ' ' || c == '\t' + || c == '\n' || c == '\v' || c == '\f' || c == '\r'); +} + +bool +c_isupper (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE + return (c >= 'A' && c <= 'Z'); +#else + switch (c) + { + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isxdigit (int c) +{ +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII + return ((c >= '0' && c <= '9') + || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); +#else + return ((c >= '0' && c <= '9') + || (c >= 'A' && c <= 'F') + || (c >= 'a' && c <= 'f')); +#endif +#else + switch (c) + { + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + return 1; + default: + return 0; + } +#endif +} + +int +c_tolower (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE + return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); +#else + switch (c) + { + case 'A': return 'a'; + case 'B': return 'b'; + case 'C': return 'c'; + case 'D': return 'd'; + case 'E': return 'e'; + case 'F': return 'f'; + case 'G': return 'g'; + case 'H': return 'h'; + case 'I': return 'i'; + case 'J': return 'j'; + case 'K': return 'k'; + case 'L': return 'l'; + case 'M': return 'm'; + case 'N': return 'n'; + case 'O': return 'o'; + case 'P': return 'p'; + case 'Q': return 'q'; + case 'R': return 'r'; + case 'S': return 's'; + case 'T': return 't'; + case 'U': return 'u'; + case 'V': return 'v'; + case 'W': return 'w'; + case 'X': return 'x'; + case 'Y': return 'y'; + case 'Z': return 'z'; + default: return c; + } +#endif +} + +int +c_toupper (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE + return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); +#else + switch (c) + { + case 'a': return 'A'; + case 'b': return 'B'; + case 'c': return 'C'; + case 'd': return 'D'; + case 'e': return 'E'; + case 'f': return 'F'; + case 'g': return 'G'; + case 'h': return 'H'; + case 'i': return 'I'; + case 'j': return 'J'; + case 'k': return 'K'; + case 'l': return 'L'; + case 'm': return 'M'; + case 'n': return 'N'; + case 'o': return 'O'; + case 'p': return 'P'; + case 'q': return 'Q'; + case 'r': return 'R'; + case 's': return 'S'; + case 't': return 'T'; + case 'u': return 'U'; + case 'v': return 'V'; + case 'w': return 'W'; + case 'x': return 'X'; + case 'y': return 'Y'; + case 'z': return 'Z'; + default: return c; + } +#endif +} === added file 'lib/c-ctype.h' --- lib/c-ctype.h 1970-01-01 00:00:00 +0000 +++ lib/c-ctype.h 2012-07-06 22:19:44 +0000 @@ -0,0 +1,294 @@ +/* Character handling in C locale. + + These functions work like the corresponding functions in , + except that they have the C (POSIX) locale hardwired, whereas the + functions' behaviour depends on the current locale set via + setlocale. + + Copyright (C) 2000-2003, 2006, 2008-2012 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . */ + +#ifndef C_CTYPE_H +#define C_CTYPE_H + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* The functions defined in this file assume the "C" locale and a character + set without diacritics (ASCII-US or EBCDIC-US or something like that). + Even if the "C" locale on a particular system is an extension of the ASCII + character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it + is ISO-8859-1), the functions in this file recognize only the ASCII + characters. */ + + +/* Check whether the ASCII optimizations apply. */ + +/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that + '0', '1', ..., '9' have consecutive integer values. */ +#define C_CTYPE_CONSECUTIVE_DIGITS 1 + +#if ('A' <= 'Z') \ + && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ + && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ + && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ + && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ + && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ + && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ + && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ + && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ + && ('Y' + 1 == 'Z') +#define C_CTYPE_CONSECUTIVE_UPPERCASE 1 +#endif + +#if ('a' <= 'z') \ + && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ + && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ + && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ + && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ + && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ + && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ + && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ + && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ + && ('y' + 1 == 'z') +#define C_CTYPE_CONSECUTIVE_LOWERCASE 1 +#endif + +#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) +/* The character set is ASCII or one of its variants or extensions, not EBCDIC. + Testing the value of '\n' and '\r' is not relevant. */ +#define C_CTYPE_ASCII 1 +#endif + + +/* Function declarations. */ + +/* Unlike the functions in , which require an argument in the range + of the 'unsigned char' type, the functions here operate on values that are + in the 'unsigned char' range or in the 'char' range. In other words, + when you have a 'char' value, you need to cast it before using it as + argument to a function: + + const char *s = ...; + if (isalpha ((unsigned char) *s)) ... + + but you don't need to cast it for the functions defined in this file: + + const char *s = ...; + if (c_isalpha (*s)) ... + */ + +extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */ + +extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST; +extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST; +extern bool c_islower (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST; +extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST; + +extern int c_tolower (int c) _GL_ATTRIBUTE_CONST; +extern int c_toupper (int c) _GL_ATTRIBUTE_CONST; + + +#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS + +/* ASCII optimizations. */ + +#undef c_isascii +#define c_isascii(c) \ + ({ int __c = (c); \ + (__c >= 0x00 && __c <= 0x7f); \ + }) + +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII +#undef c_isalnum +#define c_isalnum(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ + }) +#else +#undef c_isalnum +#define c_isalnum(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || (__c >= 'A' && __c <= 'Z') \ + || (__c >= 'a' && __c <= 'z')); \ + }) +#endif +#endif + +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII +#undef c_isalpha +#define c_isalpha(c) \ + ({ int __c = (c); \ + ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ + }) +#else +#undef c_isalpha +#define c_isalpha(c) \ + ({ int __c = (c); \ + ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ + }) +#endif +#endif + +#undef c_isblank +#define c_isblank(c) \ + ({ int __c = (c); \ + (__c == ' ' || __c == '\t'); \ + }) + +#if C_CTYPE_ASCII +#undef c_iscntrl +#define c_iscntrl(c) \ + ({ int __c = (c); \ + ((__c & ~0x1f) == 0 || __c == 0x7f); \ + }) +#endif + +#if C_CTYPE_CONSECUTIVE_DIGITS +#undef c_isdigit +#define c_isdigit(c) \ + ({ int __c = (c); \ + (__c >= '0' && __c <= '9'); \ + }) +#endif + +#if C_CTYPE_CONSECUTIVE_LOWERCASE +#undef c_islower +#define c_islower(c) \ + ({ int __c = (c); \ + (__c >= 'a' && __c <= 'z'); \ + }) +#endif + +#if C_CTYPE_ASCII +#undef c_isgraph +#define c_isgraph(c) \ + ({ int __c = (c); \ + (__c >= '!' && __c <= '~'); \ + }) +#endif + +#if C_CTYPE_ASCII +#undef c_isprint +#define c_isprint(c) \ + ({ int __c = (c); \ + (__c >= ' ' && __c <= '~'); \ + }) +#endif + +#if C_CTYPE_ASCII +#undef c_ispunct +#define c_ispunct(c) \ + ({ int _c = (c); \ + (c_isgraph (_c) && ! c_isalnum (_c)); \ + }) +#endif + +#undef c_isspace +#define c_isspace(c) \ + ({ int __c = (c); \ + (__c == ' ' || __c == '\t' \ + || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ + }) + +#if C_CTYPE_CONSECUTIVE_UPPERCASE +#undef c_isupper +#define c_isupper(c) \ + ({ int __c = (c); \ + (__c >= 'A' && __c <= 'Z'); \ + }) +#endif + +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII +#undef c_isxdigit +#define c_isxdigit(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ + }) +#else +#undef c_isxdigit +#define c_isxdigit(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || (__c >= 'A' && __c <= 'F') \ + || (__c >= 'a' && __c <= 'f')); \ + }) +#endif +#endif + +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#undef c_tolower +#define c_tolower(c) \ + ({ int __c = (c); \ + (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ + }) +#undef c_toupper +#define c_toupper(c) \ + ({ int __c = (c); \ + (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ + }) +#endif + +#endif /* optimizing for speed */ + + +#ifdef __cplusplus +} +#endif + +#endif /* C_CTYPE_H */ === added file 'lib/c-strcase.h' --- lib/c-strcase.h 1970-01-01 00:00:00 +0000 +++ lib/c-strcase.h 2012-07-06 22:19:44 +0000 @@ -0,0 +1,56 @@ +/* Case-insensitive string comparison functions in C locale. + Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2012 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef C_STRCASE_H +#define C_STRCASE_H + +#include + + +/* The functions defined in this file assume the "C" locale and a character + set without diacritics (ASCII-US or EBCDIC-US or something like that). + Even if the "C" locale on a particular system is an extension of the ASCII + character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it + is ISO-8859-1), the functions in this file recognize only the ASCII + characters. More precisely, one of the string arguments must be an ASCII + string; the other one can also contain non-ASCII characters (but then + the comparison result will be nonzero). */ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Compare strings S1 and S2, ignoring case, returning less than, equal to or + greater than zero if S1 is lexicographically less than, equal to or greater + than S2. */ +extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE; + +/* Compare no more than N characters of strings S1 and S2, ignoring case, + returning less than, equal to or greater than zero if S1 is + lexicographically less than, equal to or greater than S2. */ +extern int c_strncasecmp (const char *s1, const char *s2, size_t n) + _GL_ATTRIBUTE_PURE; + + +#ifdef __cplusplus +} +#endif + + +#endif /* C_STRCASE_H */ === added file 'lib/c-strcasecmp.c' --- lib/c-strcasecmp.c 1970-01-01 00:00:00 +0000 +++ lib/c-strcasecmp.c 2012-07-06 22:19:44 +0000 @@ -0,0 +1,56 @@ +/* c-strcasecmp.c -- case insensitive string comparator in C locale + Copyright (C) 1998-1999, 2005-2006, 2009-2012 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include "c-strcase.h" + +#include + +#include "c-ctype.h" + +int +c_strcasecmp (const char *s1, const char *s2) +{ + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + c1 = c_tolower (*p1); + c2 = c_tolower (*p2); + + if (c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); +} === added file 'lib/c-strncasecmp.c' --- lib/c-strncasecmp.c 1970-01-01 00:00:00 +0000 +++ lib/c-strncasecmp.c 2012-07-06 22:19:44 +0000 @@ -0,0 +1,56 @@ +/* c-strncasecmp.c -- case insensitive string comparator in C locale + Copyright (C) 1998-1999, 2005-2006, 2009-2012 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include "c-strcase.h" + +#include + +#include "c-ctype.h" + +int +c_strncasecmp (const char *s1, const char *s2, size_t n) +{ + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + if (p1 == p2 || n == 0) + return 0; + + do + { + c1 = c_tolower (*p1); + c2 = c_tolower (*p2); + + if (--n == 0 || c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); +} ------------------------------------------------------------ revno: 108924 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 17:34:49 -0400 message: * lisp/kmacro.el (kmacro-call-macro): Restore repeat message. (Bug#11817) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-06 19:06:54 +0000 +++ lisp/ChangeLog 2012-07-06 21:34:49 +0000 @@ -1,5 +1,7 @@ 2012-07-06 Glenn Morris + * kmacro.el (kmacro-call-macro): Restore repeat message. (Bug#11817) + * files.el (toggle-read-only): Restrict message to interactive use. 2012-07-06 Michael Albinus === modified file 'lisp/kmacro.el' --- lisp/kmacro.el 2012-05-05 02:50:20 +0000 +++ lisp/kmacro.el 2012-07-06 21:34:49 +0000 @@ -629,8 +629,7 @@ (> (length (this-single-command-keys)) 1)) ;; Used when we're in the process of repeating. (eq no-repeat 'repeating)) - last-input-event)) - repeat-key-str) + last-input-event))) (if end-macro (kmacro-end-macro arg) (call-last-kbd-macro arg #'kmacro-loop-setup-function)) @@ -641,7 +640,13 @@ (if (eq kmacro-call-repeat-key t) repeat-key kmacro-call-repeat-key))) - (setq repeat-key-str (format-kbd-macro (vector repeat-key) nil)) + ;; Issue a hint to the user, if the echo area isn't in use. + (unless (current-message) + (message "(Type %s to repeat macro%s)" + (format-kbd-macro (vector repeat-key) nil) + (if (and kmacro-call-repeat-with-arg + arg (> arg 1)) + (format " %d times" arg) ""))) ;; Can't use the `keep-pred' arg because this overlay keymap needs to be ;; removed during the next run of the kmacro (i.e. we need to add&remove ;; this overlay-map at each repetition). ------------------------------------------------------------ revno: 108923 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 14:29:50 -0700 message: * configure.in: Document --enable-gcc-warnings better. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-06 21:07:46 +0000 +++ ChangeLog 2012-07-06 21:29:50 +0000 @@ -1,10 +1,13 @@ 2012-07-06 Paul Eggert + * configure.in: Document --enable-gcc-warnings better. + Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). This is safer than strcasecmp, which has unspecified behavior outside the POSIX locale and in practice sometimes does not work in multibyte locales. Similarly for c_strncasecmp and strncasecmp. * configure.in (strcasecmp, strncasecmp): Remove checks. + * lib/c-ctype.c, lib/c-ctype.h, lib/c-strcase.h, lib/c-strcasecmp.c: * lib/c-strncasecmp.c: New files, taken from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. === modified file 'configure.in' --- configure.in 2012-07-06 21:07:46 +0000 +++ configure.in 2012-07-06 21:29:50 +0000 @@ -575,7 +575,9 @@ AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings], - [turn on lots of GCC warnings (for developers)])], + [turn on lots of GCC warnings. This is intended for + developers, and may generate false alarms when used + with older or non-GNU development tools.])], [case $enableval in yes|no) ;; *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; @@ -597,7 +599,7 @@ LTO="-flto=$CPUS" else LTO="-flto" - fi + fi old_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $LTO" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], ------------------------------------------------------------ revno: 108922 fixes bug(s): http://debbugs.gnu.org/11786 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 14:07:46 -0700 message: Use c_strcasecmp for ASCII case-insensitive comparison. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-06 17:53:26 +0000 +++ ChangeLog 2012-07-06 21:07:46 +0000 @@ -1,5 +1,14 @@ 2012-07-06 Paul Eggert + Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). + This is safer than strcasecmp, which has unspecified behavior + outside the POSIX locale and in practice sometimes does not work + in multibyte locales. Similarly for c_strncasecmp and strncasecmp. + * configure.in (strcasecmp, strncasecmp): Remove checks. + * lib/c-ctype.c, lib/c-ctype.h, lib/c-strcase.h, lib/c-strcasecmp.c: + * lib/c-strncasecmp.c: New files, taken from gnulib. + * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. + Merge from gnulib, incorporating: 2012-07-06 timespec-sub: avoid duplicate include Reported by Juanma Barranquero. === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-07-05 06:32:41 +0000 +++ admin/ChangeLog 2012-07-06 21:07:46 +0000 @@ -1,3 +1,8 @@ +2012-07-06 Paul Eggert + + Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). + * merge-gnulib (GNULIB_MODULES): Add c-strcase. + 2012-07-05 Dmitry Antipov * coccinelle/xzalloc.cocci: Semantic patch to convert === modified file 'admin/merge-gnulib' --- admin/merge-gnulib 2012-06-22 21:17:42 +0000 +++ admin/merge-gnulib 2012-07-06 21:07:46 +0000 @@ -26,7 +26,7 @@ GNULIB_URL=git://git.savannah.gnu.org/gnulib.git GNULIB_MODULES=' - alloca-opt + alloca-opt c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 filemode getloadavg getopt-gnu gettime gettimeofday === modified file 'configure.in' --- configure.in 2012-07-04 08:07:26 +0000 +++ configure.in 2012-07-06 21:07:46 +0000 @@ -2707,7 +2707,6 @@ difftime posix_memalign \ getpwent endpwent getgrent endgrent \ touchlock \ -strcasecmp strncasecmp \ cfmakeraw cfsetspeed copysign __executable_start) dnl Cannot use AC_CHECK_FUNCS === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-07-06 19:50:17 +0000 +++ lib-src/ChangeLog 2012-07-06 21:07:46 +0000 @@ -1,3 +1,10 @@ +2012-07-06 Paul Eggert + + Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). + * etags.c: Include c-strcase.h. + (etags_strcasecmp, etags_strncasecmp): Remove. + All uses replaced with c_strcasecmp and c_strncasecmp. + 2012-07-06 Andreas Schwab * make-docfile.c (write_globals): Warn about duplicate function === modified file 'lib-src/etags.c' --- lib-src/etags.c 2012-06-26 01:05:39 +0000 +++ lib-src/etags.c 2012-07-06 21:07:46 +0000 @@ -144,6 +144,7 @@ #include #include #include +#include #include #ifdef NDEBUG @@ -174,9 +175,9 @@ #endif #define streq(s,t) (assert ((s)!=NULL || (t)!=NULL), !strcmp (s, t)) -#define strcaseeq(s,t) (assert ((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t)) +#define strcaseeq(s,t) (assert ((s)!=NULL && (t)!=NULL), !c_strcasecmp (s, t)) #define strneq(s,t,n) (assert ((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) -#define strncaseeq(s,t,n) (assert ((s)!=NULL && (t)!=NULL), !etags_strncasecmp (s, t, n)) +#define strncaseeq(s,t,n) (assert ((s)!=NULL && (t)!=NULL), !c_strncasecmp (s, t, n)) #define CHARS 256 /* 2^sizeof(char) */ #define CHAR(x) ((unsigned int)(x) & (CHARS - 1)) @@ -375,16 +376,6 @@ static char *savestr (const char *); static char *etags_strchr (const char *, int); static char *etags_strrchr (const char *, int); -#ifdef HAVE_STRCASECMP -#define etags_strcasecmp(x,y) strcasecmp ((x), (y)) -#else -static int etags_strcasecmp (const char *, const char *); -#endif -#ifdef HAVE_STRNCASECMP -#define etags_strncasecmp(x,y,z) strncasecmp ((x), (y), (z)) -#else -static int etags_strncasecmp (const char *, const char *, int); -#endif static char *etags_getcwd (void); static char *relative_filename (char *, char *); static char *absolute_filename (char *, char *); @@ -6314,52 +6305,6 @@ return NULL; } -#ifndef HAVE_STRCASECMP -/* - * Compare two strings, ignoring case for alphabetic characters. - * - * Same as BSD's strcasecmp, included for portability. - */ -static int -etags_strcasecmp (register const char *s1, register const char *s2) -{ - while (*s1 != '\0' - && (ISALPHA (*s1) && ISALPHA (*s2) - ? lowcase (*s1) == lowcase (*s2) - : *s1 == *s2)) - s1++, s2++; - - return (ISALPHA (*s1) && ISALPHA (*s2) - ? lowcase (*s1) - lowcase (*s2) - : *s1 - *s2); -} -#endif /* HAVE_STRCASECMP */ - -#ifndef HAVE_STRNCASECMP -/* - * Compare two strings, ignoring case for alphabetic characters. - * Stop after a given number of characters - * - * Same as BSD's strncasecmp, included for portability. - */ -static int -etags_strncasecmp (register const char *s1, register const char *s2, register int n) -{ - while (*s1 != '\0' && n-- > 0 - && (ISALPHA (*s1) && ISALPHA (*s2) - ? lowcase (*s1) == lowcase (*s2) - : *s1 == *s2)) - s1++, s2++; - - if (n < 0) - return 0; - else - return (ISALPHA (*s1) && ISALPHA (*s2) - ? lowcase (*s1) - lowcase (*s2) - : *s1 - *s2); -} -#endif /* HAVE_STRCASECMP */ - /* Skip spaces (end of string is not space), return new pointer. */ static char * skip_spaces (char *cp) === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2012-06-22 21:17:42 +0000 +++ lib/gnulib.mk 2012-07-06 21:07:46 +0000 @@ -21,7 +21,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=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --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 careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdarg stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub 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=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --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-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdarg stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings MOSTLYCLEANFILES += core *.stackdump @@ -64,6 +64,18 @@ ## end gnulib module allocator +## begin gnulib module c-ctype + +libgnu_a_SOURCES += c-ctype.h c-ctype.c + +## end gnulib module c-ctype + +## begin gnulib module c-strcase + +libgnu_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c + +## end gnulib module c-strcase + ## begin gnulib module careadlinkat libgnu_a_SOURCES += careadlinkat.c === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2012-06-26 01:05:39 +0000 +++ lwlib/ChangeLog 2012-07-06 21:07:46 +0000 @@ -1,3 +1,9 @@ +2012-07-06 Paul Eggert + + Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). + * lwlib.c: Include c-strcase.h. + (lwlib_strcasecmp): Remove. All uses replaced with c_strcasecmp. + 2012-06-26 Paul Eggert Clean out last vestiges of the old HAVE_CONFIG_H stuff. === modified file 'lwlib/lwlib.c' --- lwlib/lwlib.c 2012-06-26 01:05:39 +0000 +++ lwlib/lwlib.c 2012-07-06 21:07:46 +0000 @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -112,31 +113,6 @@ return result; } -#ifdef HAVE_STRCASECMP -#define lwlib_strcasecmp(x,y) strcasecmp ((x), (y)) -#else - -/* Like strcmp but ignore differences in case. */ - -static int -lwlib_strcasecmp (const char *s1, const char *s2) -{ - while (1) - { - int c1 = *s1++; - int c2 = *s2++; - if (isupper (c1)) - c1 = tolower (c1); - if (isupper (c2)) - c2 = tolower (c2); - if (c1 != c2) - return (c1 > c2 ? 1 : -1); - if (c1 == 0) - return 0; - } -} -#endif /* HAVE_STRCASECMP */ - static void safe_free_str (char *s) { @@ -733,7 +709,7 @@ { const widget_creation_entry* cur; for (cur = table; cur->type; cur++) - if (!lwlib_strcasecmp (type, cur->type)) + if (!c_strcasecmp (type, cur->type)) return cur->function; return NULL; } === modified file 'm4/gnulib-comp.m4' --- m4/gnulib-comp.m4 2012-06-22 21:17:42 +0000 +++ m4/gnulib-comp.m4 2012-07-06 21:07:46 +0000 @@ -40,6 +40,8 @@ AC_REQUIRE([gl_PROG_AR_RANLIB]) # Code from module alloca-opt: # Code from module allocator: + # Code from module c-ctype: + # Code from module c-strcase: # Code from module careadlinkat: # Code from module clock-time: # Code from module crypto/md5: @@ -518,6 +520,11 @@ lib/alloca.in.h lib/allocator.c lib/allocator.h + lib/c-ctype.c + lib/c-ctype.h + lib/c-strcase.h + lib/c-strcasecmp.c + lib/c-strncasecmp.c lib/careadlinkat.c lib/careadlinkat.h lib/dosname.h === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 20:49:23 +0000 +++ src/ChangeLog 2012-07-06 21:07:46 +0000 @@ -1,5 +1,12 @@ 2012-07-06 Paul Eggert + Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786). + * dispextern.h, nsfns.m, nsterm.m: Include . + * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp. + * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp. + * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp. + * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove. + * xfont.c (compare_font_names): Redo to omit the need for casts. 2012-07-06 Andreas Schwab === modified file 'src/dispextern.h' --- src/dispextern.h 2012-07-03 18:24:42 +0000 +++ src/dispextern.h 2012-07-06 21:07:46 +0000 @@ -46,6 +46,13 @@ #include "msdos.h" #endif +#include +static inline int +xstrcasecmp (char const *a, char const *b) +{ + return c_strcasecmp (a, b); +} + #ifdef HAVE_X_WINDOWS typedef struct x_display_info Display_Info; typedef XImage * XImagePtr; @@ -3198,11 +3205,6 @@ char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, int *); void prepare_face_for_display (struct frame *, struct face *); -#ifdef HAVE_STRCASECMP -#define xstrcasecmp(x,y) strcasecmp ((x), (y)) -#else -int xstrcasecmp (const char *, const char *); -#endif int lookup_named_face (struct frame *, Lisp_Object, int); int lookup_basic_face (struct frame *, int); int smaller_face (struct frame *, int, int); === modified file 'src/nsfns.m' --- src/nsfns.m 2012-07-05 18:35:48 +0000 +++ src/nsfns.m 2012-07-06 21:07:46 +0000 @@ -33,6 +33,7 @@ #include #include #include +#include #include "lisp.h" #include "blockinput.h" @@ -2226,8 +2227,8 @@ res = ns_get_defaults_value (toCheck); return !res ? NULL : - (!strncasecmp (res, "YES", 3) ? "true" : - (!strncasecmp (res, "NO", 2) ? "false" : res)); + (!c_strncasecmp (res, "YES", 3) ? "true" : + (!c_strncasecmp (res, "NO", 2) ? "false" : res)); } === modified file 'src/nsterm.m' --- src/nsterm.m 2012-07-05 18:35:48 +0000 +++ src/nsterm.m 2012-07-06 21:07:46 +0000 @@ -36,6 +36,7 @@ #include #include #include +#include #include "lisp.h" #include "blockinput.h" @@ -3848,9 +3849,9 @@ { double f; char *pos; - if (strcasecmp (value, "YES") == 0) + if (c_strcasecmp (value, "YES") == 0) *result = yesval; - else if (strcasecmp (value, "NO") == 0) + else if (c_strcasecmp (value, "NO") == 0) *result = noval; else if (is_float && (f = strtod (value, &pos), pos != value)) *result = make_float (f); === modified file 'src/xfaces.c' --- src/xfaces.c 2012-07-05 18:35:48 +0000 +++ src/xfaces.c 2012-07-06 21:07:46 +0000 @@ -715,30 +715,6 @@ } #endif /* HAVE_NS */ -#ifndef HAVE_STRCASECMP -/* Like strcasecmp/stricmp. Used to compare parts of font names which - are in ISO8859-1. */ - -int -xstrcasecmp (const char *s1, const char *s2) -{ - while (*s1 && *s2) - { - unsigned char b1 = *s1; - unsigned char b2 = *s2; - unsigned char c1 = tolower (b1); - unsigned char c2 = tolower (b2); - if (c1 != c2) - return c1 < c2 ? -1 : 1; - ++s1, ++s2; - } - - if (*s1 == 0) - return *s2 == 0 ? 0 : -1; - return 1; -} -#endif /* HAVE_STRCASECMP */ - /* If FRAME is nil, return a pointer to the selected frame. Otherwise, check that FRAME is a live frame, and return a pointer to it. NPARAM is the parameter number of FRAME, for ------------------------------------------------------------ revno: 108921 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 13:49:23 -0700 message: * xfont.c (compare_font_names): Redo to omit the need for casts. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 20:00:42 +0000 +++ src/ChangeLog 2012-07-06 20:49:23 +0000 @@ -1,3 +1,7 @@ +2012-07-06 Paul Eggert + + * xfont.c (compare_font_names): Redo to omit the need for casts. + 2012-07-06 Andreas Schwab * xfns.c (Fx_change_window_property): Doc fix. === modified file 'src/xfont.c' --- src/xfont.c 2012-06-13 00:26:40 +0000 +++ src/xfont.c 2012-07-06 20:49:23 +0000 @@ -164,8 +164,9 @@ static int compare_font_names (const void *name1, const void *name2) { - return xstrcasecmp (*(const char **) name1, - *(const char **) name2); + char *const *n1 = name1; + char *const *n2 = name2; + return xstrcasecmp (*n1, *n2); } /* Decode XLFD as iso-8859-1 into OUTPUT, and return the byte length ------------------------------------------------------------ revno: 108920 committer: Andreas Schwab branch nick: emacs timestamp: Fri 2012-07-06 22:00:42 +0200 message: * xfns.c (Fx_change_window_property): Doc fix. * w32fns.c (Fx_change_window_property): Doc fix. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 19:34:39 +0000 +++ src/ChangeLog 2012-07-06 20:00:42 +0000 @@ -1,5 +1,8 @@ 2012-07-06 Andreas Schwab + * xfns.c (Fx_change_window_property): Doc fix. + * w32fns.c (Fx_change_window_property): Doc fix. + * w32fns.c (Fx_window_property): Accept the same arguments as the X Windows version. Doc fix. * xfns.c (Fx_window_property): Doc fix. (Bug#11870) === modified file 'src/w32fns.c' --- src/w32fns.c 2012-07-06 19:34:39 +0000 +++ src/w32fns.c 2012-07-06 20:00:42 +0000 @@ -4897,9 +4897,10 @@ FORMAT gives the size in bits of each element if VALUE is a list. It must be one of 8, 16 or 32. If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. -If OUTER_P is non-nil, the property is changed for the outer X window of +If OUTER-P is non-nil, the property is changed for the outer X window of FRAME. Default is to change on the edit X window. */) - (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) + (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, + Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) { struct frame *f = check_x_frame (frame); Atom prop_atom; === modified file 'src/xfns.c' --- src/xfns.c 2012-07-06 19:34:39 +0000 +++ src/xfns.c 2012-07-06 20:00:42 +0000 @@ -4189,9 +4189,10 @@ FORMAT gives the size in bits of each element if VALUE is a list. It must be one of 8, 16 or 32. If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. -If OUTER_P is non-nil, the property is changed for the outer X window of +If OUTER-P is non-nil, the property is changed for the outer X window of FRAME. Default is to change on the edit X window. */) - (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) + (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, + Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) { struct frame *f = check_x_frame (frame); Atom prop_atom; ------------------------------------------------------------ revno: 108919 committer: Andreas Schwab branch nick: emacs timestamp: Fri 2012-07-06 21:50:17 +0200 message: * make-docfile.c (write_globals): Warn about duplicate function definitions with differing signatures. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-07-03 21:14:48 +0000 +++ lib-src/ChangeLog 2012-07-06 19:50:17 +0000 @@ -1,3 +1,8 @@ +2012-07-06 Andreas Schwab + + * make-docfile.c (write_globals): Warn about duplicate function + definitions with differing signatures. + 2012-07-03 Paul Eggert * make-docfile.c (scan_c_file): Suppress GCC warning. === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2012-07-03 21:14:48 +0000 +++ lib-src/make-docfile.c 2012-07-06 19:50:17 +0000 @@ -693,7 +693,13 @@ while (i + 1 < num_globals && !strcmp (globals[i].name, globals[i + 1].name)) - ++i; + { + if (globals[i].type == FUNCTION + && globals[i].value != globals[i + 1].value) + error ("function '%s' defined twice with differing signatures", + globals[i].name); + ++i; + } } if (!seen_defun) ------------------------------------------------------------ revno: 108918 committer: Andreas Schwab branch nick: emacs timestamp: Fri 2012-07-06 21:34:39 +0200 message: Fixes: debbugs:11870 * w32fns.c (Fx_window_property): Accept the same arguments as the X Windows version. Doc fix. * xfns.c (Fx_window_property): Doc fix. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 17:19:33 +0000 +++ src/ChangeLog 2012-07-06 19:34:39 +0000 @@ -1,3 +1,9 @@ +2012-07-06 Andreas Schwab + + * w32fns.c (Fx_window_property): Accept the same arguments as the + X Windows version. Doc fix. + * xfns.c (Fx_window_property): Doc fix. (Bug#11870) + 2012-07-06 Juanma Barranquero Eli Zaretskii === modified file 'src/w32fns.c' --- src/w32fns.c 2012-07-05 06:32:41 +0000 +++ src/w32fns.c 2012-07-06 19:34:39 +0000 @@ -4944,23 +4944,24 @@ DEFUN ("x-window-property", Fx_window_property, Sx_window_property, - 1, 2, 0, + 1, 6, 0, doc: /* Value is the value of window property PROP on FRAME. If FRAME is nil or omitted, use the selected frame. -On MS Windows, this function only accepts the PROP and FRAME arguments. - On X Windows, the following optional arguments are also accepted: If TYPE is nil or omitted, get the property as a string. Otherwise TYPE is the name of the atom that denotes the type expected. If SOURCE is non-nil, get the property on that window instead of from FRAME. The number 0 denotes the root window. -If DELETE_P is non-nil, delete the property after retrieving it. -If VECTOR_RET_P is non-nil, don't return a string but a vector of values. +If DELETE-P is non-nil, delete the property after retrieving it. +If VECTOR-RET-P is non-nil, don't return a string but a vector of values. + +On MS Windows, this function accepts but ignores those optional arguments. Value is nil if FRAME hasn't a property with name PROP or if PROP has no value of TYPE (always string in the MS Windows case). */) - (Lisp_Object prop, Lisp_Object frame) + (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, + Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p) { struct frame *f = check_x_frame (frame); Atom prop_atom; === modified file 'src/xfns.c' --- src/xfns.c 2012-07-05 18:35:48 +0000 +++ src/xfns.c 2012-07-06 19:34:39 +0000 @@ -4292,19 +4292,20 @@ doc: /* Value is the value of window property PROP on FRAME. If FRAME is nil or omitted, use the selected frame. -On MS Windows, this function only accepts the PROP and FRAME arguments. - On X Windows, the following optional arguments are also accepted: If TYPE is nil or omitted, get the property as a string. Otherwise TYPE is the name of the atom that denotes the type expected. If SOURCE is non-nil, get the property on that window instead of from FRAME. The number 0 denotes the root window. -If DELETE_P is non-nil, delete the property after retrieving it. -If VECTOR_RET_P is non-nil, don't return a string but a vector of values. +If DELETE-P is non-nil, delete the property after retrieving it. +If VECTOR-RET-P is non-nil, don't return a string but a vector of values. + +On MS Windows, this function accepts but ignores those optional arguments. Value is nil if FRAME hasn't a property with name PROP or if PROP has no value of TYPE (always string in the MS Windows case). */) - (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p) + (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, + Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p) { struct frame *f = check_x_frame (frame); Atom prop_atom; ------------------------------------------------------------ revno: 108917 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 15:06:54 -0400 message: * lisp/files.el (toggle-read-only): Restrict message to interactive use. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-06 13:16:13 +0000 +++ lisp/ChangeLog 2012-07-06 19:06:54 +0000 @@ -1,3 +1,7 @@ +2012-07-06 Glenn Morris + + * files.el (toggle-read-only): Restrict message to interactive use. + 2012-07-06 Michael Albinus * net/tramp.el (tramp-restricted-shell-hosts-alist): New defcustom. === modified file 'lisp/files.el' --- lisp/files.el 2012-07-06 04:31:46 +0000 +++ lisp/files.el 2012-07-06 19:06:54 +0000 @@ -4856,8 +4856,9 @@ (view-mode-enter)) (t (setq buffer-read-only (not buffer-read-only)) (force-mode-line-update)))) - (message "Read-only %s for this buffer" - (if buffer-read-only "enabled" "disabled")))) + (if (called-interactively-p 'interactive) + (message "Read-only %s for this buffer" + (if buffer-read-only "enabled" "disabled"))))) (defun insert-file (filename) "Insert contents of file FILENAME into buffer after point. ------------------------------------------------------------ revno: 108916 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 10:53:26 -0700 message: timespec-sub: avoid duplicate include diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-06 07:40:43 +0000 +++ ChangeLog 2012-07-06 17:53:26 +0000 @@ -1,3 +1,9 @@ +2012-07-06 Paul Eggert + + Merge from gnulib, incorporating: + 2012-07-06 timespec-sub: avoid duplicate include + Reported by Juanma Barranquero. + 2012-07-06 Glenn Morris * make-dist [update]: Let autoreconf figure out what needs updating. === modified file 'lib/timespec-sub.c' --- lib/timespec-sub.c 2012-06-22 21:26:37 +0000 +++ lib/timespec-sub.c 2012-07-06 17:53:26 +0000 @@ -22,7 +22,6 @@ 999999999. */ #include -#include #include "timespec.h" #include "intprops.h" ------------------------------------------------------------ revno: 108915 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2012-07-06 19:19:33 +0200 message: * nt/config.nt: Complete rework to bring it in sync with autogen/config.in. All Windows-specific code moved to src/s/ms-w32.h. * src/s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt. Windows-specific code from nt/config.nt moved here. Obsolete settings removed. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-07-04 17:17:19 +0000 +++ nt/ChangeLog 2012-07-06 17:19:33 +0000 @@ -1,6 +1,12 @@ 2012-07-04 Juanma Barranquero Eli Zaretskii + * config.nt: Complete rework to bring it in sync with autogen/config.in. + All Windows-specific code moved to src/s/ms-w32.h. + +2012-07-04 Juanma Barranquero + Eli Zaretskii + * configure.bat (enablechecking): Enable checks through src/config.h, not the compiler's command line. === modified file 'nt/config.nt' --- nt/config.nt 2012-07-04 16:46:42 +0000 +++ nt/config.nt 2012-07-06 17:19:33 +0000 @@ -1,6 +1,7 @@ -/* GNU Emacs site configuration template file. -*- C -*- +/* GNU Emacs site configuration template file. -Copyright (C) 1988, 1993-1994, 2001-2012 Free Software Foundation, Inc. +Copyright (C) 1988, 1993-1994, 2001-2012 + Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -17,252 +18,189 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ +/* NOTE: + This file is intentionally kept in sync with autogen/config.in to + ease maintenance. Please do not remove non-Windows related stuff + unless strictly necessary. Also, before adding anything here + consider whether src/s/ms-w32.h would be a better place; this is + particularly true for gcc vs. MSVC conditional defines, MinGW or + MSVC specific code, and macros not already defined in config.in. */ -/* No code in Emacs #includes config.h twice, but some of the code +/* No code in Emacs #includes config.h twice, but some bits of code intended to work with other packages as well (like gmalloc.c) think they can include it as many times as they like. */ #ifndef EMACS_CONFIG_H #define EMACS_CONFIG_H -/* These are all defined in the top-level Makefile by configure. - They're here only for reference. */ - -/* Define GNU_MALLOC if you want to use the GNU memory allocator. */ -#define GNU_MALLOC - -/* Define if you are using the GNU C Library. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define to the number of bits in type 'ptrdiff_t'. */ +#undef BITSIZEOF_PTRDIFF_T + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#undef BITSIZEOF_SIG_ATOMIC_T + +/* Define to the number of bits in type 'size_t'. */ +#undef BITSIZEOF_SIZE_T + +/* Define to the number of bits in type 'wchar_t'. */ +#undef BITSIZEOF_WCHAR_T + +/* Define to the number of bits in type 'wint_t'. */ +#undef BITSIZEOF_WINT_T + +/* Define if SA_RESTART should not be used. */ +#undef BROKEN_SA_RESTART + +/* Define if SIGIO should not be used. */ +#undef BROKEN_SIGIO + +/* Define if Emacs cannot be dumped on your system. */ +#undef CANNOT_DUMP + +/* Define this to enable compile time checks for the Lisp_Object data type. */ +#undef CHECK_LISP_OBJECT_TYPE + +/* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP + systems. This function is required for 'alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using 'alloca.c'. */ +#undef C_ALLOCA + +/* Define to 1 for DGUX with . */ +#undef DGUX + +/* Define to 1 if you are using the GNU C Library. */ #undef DOUG_LEA_MALLOC -/* Define REL_ALLOC if you want to use the relocating allocator for - buffer space. */ -#define REL_ALLOC - -/* Enable conservative stack marking for GC. */ -#define GC_MARK_STACK 1 - -/* MSVC ignores the "register" keyword, so test fails even though - setjmp does work. */ -#define GC_SETJMP_WORKS 1 - -/* Define HAVE_X_WINDOWS if you want to use the X window system. */ -#undef HAVE_X_WINDOWS - -/* Define HAVE_X11 if you want to use version 11 of X windows. - Otherwise, Emacs expects to use version 10. */ -#undef HAVE_X11 - -/* Define if using an X toolkit. */ -#undef USE_X_TOOLKIT - -/* Define this if you have Motif 2.1 or newer. */ -#undef HAVE_MOTIF_2_1 - -/* Define HAVE_MENUS if you have mouse menus. - (This is automatic if you use X, but the option to specify it remains.) - It is also defined with other window systems that support xmenu.c. */ -#undef HAVE_MENUS - -/* Define if we have the X11R6 or newer version of Xt. */ -#undef HAVE_X11XTR6 - -/* Define if we have the X11R6 or newer version of Xlib. */ -#undef HAVE_X11R6 - -/* Define if netdb.h declares h_errno. */ -#undef HAVE_H_ERRNO - -/* If we're using any sort of window system, define some consequences. */ -#ifdef HAVE_X_WINDOWS -#define HAVE_WINDOW_SYSTEM -#define HAVE_MOUSE -#endif - -/* Define USER_FULL_NAME to return a string - that is the user's full name. - It can assume that the variable `pw' - points to the password file entry for this user. - - At some sites, the pw_gecos field contains - the user's full name. If neither this nor any other - field contains the right thing, use pw_name, - giving the user's login name, since that is better than nothing. */ -#define USER_FULL_NAME pw->pw_gecos - -/* Define AMPERSAND_FULL_NAME if you use the convention - that & in the full name stands for the login id. */ -#undef AMPERSAND_FULL_NAME - -/* Things set by --with options in the configure script. */ - -/* Define to support POP mail retrieval. */ -#undef MAIL_USE_POP - -/* Define to support Kerberos-authenticated POP mail retrieval. */ -#undef KERBEROS -/* Define to use Kerberos 5 instead of Kerberos 4 */ -#undef KERBEROS5 - -/* Define to support using a Hesiod database to find the POP server. */ -#undef HESIOD - -/* Some things figured out by the configure script, grouped as they are in - configure.in. */ -#ifndef _ALL_SOURCE /* suppress warning if this is pre-defined */ -#undef _ALL_SOURCE -#endif -#undef HAVE_SYS_SELECT_H -#undef HAVE_SYS_TIMEB_H -#undef HAVE_SYS_TIME_H -#undef HAVE_UNISTD_H -#undef HAVE_UTIME_H -#undef HAVE_LINUX_VERSION_H -#undef HAVE_SYS_SYSTEMINFO_H -#undef HAVE_TERMIOS_H -#undef HAVE_STRINGS_H -#undef HAVE_PWD_H - -#undef HAVE_LIBDNET -#undef HAVE_LIBPTHREADS -#undef HAVE_LIBRESOLV -#undef HAVE_LIBXMU - -/* movemail Kerberos support */ -/* libraries */ -#undef HAVE_LIBKRB -#undef HAVE_LIBKRB4 -#undef HAVE_LIBDES -#undef HAVE_LIBDES425 -#undef HAVE_LIBKRB5 -#undef HAVE_LIBCRYPTO -#undef HAVE_LIBCOM_ERR -/* header files */ -#undef HAVE_KRB5_H -#undef HAVE_DES_H -#undef HAVE_KRB_H -#undef HAVE_KERBEROSIV_DES_H -#undef HAVE_KERBEROSIV_KRB_H -#undef HAVE_KERBEROS_DES_H -#undef HAVE_KERBEROS_KRB_H -#undef HAVE_COM_ERR_H - -/* Mail-file locking */ -#undef HAVE_LIBMAIL -#undef HAVE_MAILLOCK_H -#undef HAVE_TOUCHLOCK - +/* Define to the canonical Emacs configuration name. */ +#undef EMACS_CONFIGURATION + +/* Define to the options passed to configure. */ +#undef EMACS_CONFIG_OPTIONS + +/* Define to 1 if expensive run-time data type and consistency checks are + enabled. */ +#undef ENABLE_CHECKING + +/* Define to 1 if futimesat mishandles a NULL file name. */ +#undef FUTIMESAT_NULL_BUG + +/* Define this to check for errors in cons list. */ +#undef GC_CHECK_CONS_LIST + +/* Define this temporarily to hunt a bug. If defined, the size of strings is + redundantly recorded in sdata structures so that it can be compared to the + sizes recorded in Lisp strings. */ +#undef GC_CHECK_STRING_BYTES + +/* Define this to check the string free list. */ +#undef GC_CHECK_STRING_FREE_LIST + +/* Define this to check for short string overrun. */ +#undef GC_CHECK_STRING_OVERRUN + +/* Define to 1 if the `getpgrp' function requires zero arguments. */ +#undef GETPGRP_VOID + +/* Define if gettimeofday clobbers the localtime buffer. */ +#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME + +/* Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday. */ +#undef GETTIMEOFDAY_TIMEZONE + +/* Define this to enable glyphs debugging code. */ +/* #undef GLYPH_DEBUG */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#undef GNULIB_FSCANF + +/* enable some gnulib portability checks */ +#undef GNULIB_PORTCHECK + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#undef GNULIB_SCANF + +/* Define to 1 if you want to use the GNU memory allocator. */ +#define GNU_MALLOC 1 + +/* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */ +#undef HAVE_AIX_SMT_EXP + +/* Define to 1 if you have the `alarm' function. */ +#undef HAVE_ALARM + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#undef HAVE_ALLOCA + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ #undef HAVE_ALLOCA_H -#undef HAVE_GETTIMEOFDAY -/* If we don't have gettimeofday, - the test for GETTIMEOFDAY_ONE_ARGUMENT may succeed, - but we should ignore it. */ -#ifdef HAVE_GETTIMEOFDAY -#undef GETTIMEOFDAY_ONE_ARGUMENT -#endif -#undef HAVE_GETHOSTNAME -#undef HAVE_DUP2 -#undef HAVE_RENAME -#undef HAVE_CLOSEDIR - -#undef TM_IN_SYS_TIME -#undef HAVE_TM_ZONE - -/* Define to 1 if you don't have `tm_zone' but do have the external array - `tzname'. */ -#define HAVE_TZNAME 1 - -/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. - */ -#define HAVE_DECL_TZNAME 1 - -#undef const - -#undef HAVE_LONG_FILE_NAMES - -#undef CRAY_STACKSEG_END - -#undef HAVE_XRMSETDATABASE -#undef HAVE_XSCREENRESOURCESTRING -#undef HAVE_XSCREENNUMBEROFSCREEN - -#undef HAVE_MKDIR -#undef HAVE_RMDIR -#undef HAVE_RANDOM -#undef HAVE_LRAND48 -#undef HAVE_LOGB -#undef HAVE_FREXP -#undef HAVE_FMOD -#undef HAVE_RINT -#undef HAVE_CBRT -#undef HAVE_RES_INIT /* For -lresolv on Suns. */ -#undef HAVE_SETSID -#undef HAVE_FPATHCONF -#undef HAVE_SELECT -#undef HAVE_EUIDACCESS -#undef HAVE_GETPAGESIZE -#undef HAVE_GET_CURRENT_DIR_NAME -#undef HAVE_TZSET -#undef HAVE_SETLOCALE -#undef HAVE_UTIMES -#undef HAVE_SETRLIMIT -#undef HAVE_SETPGID -/* If you think about defining HAVE_GETCWD, don't: the alternative - getwd is redefined on w32.c, and does not really return the current - directory, to get the desired results elsewhere in Emacs */ -#undef HAVE_GETCWD -#undef HAVE_SHUTDOWN -#undef HAVE_STRFTIME -/* Standard Windows strftime does not support POSIX.2 extensions. */ -#define STRFTIME_NO_POSIX2 1 - -#define HAVE_SENDTO 1 -#define HAVE_RECVFROM 1 -#define HAVE_GETSOCKNAME 1 -#define HAVE_GETPEERNAME 1 -#define HAVE_SNPRINTF 1 -#define HAVE_LANGINFO_CODESET 1 -/* Local (unix) sockets are not supported. */ -#undef HAVE_SYS_UN_H - -#define LOCALTIME_CACHE -#undef HAVE_INET_SOCKETS - -#undef HAVE_AIX_SMT_EXP - -/* Define if you have the ANSI `strerror' function. - Otherwise you must have the variable `char *sys_errlist[]'. */ -#undef HAVE_STRERROR - -/* Define if `sys_siglist' is declared by . */ -#undef SYS_SIGLIST_DECLARED - -/* Define if `struct utimbuf' is declared by . */ -#undef HAVE_STRUCT_UTIMBUF - -/* Define if `struct timeval' is declared by . */ -#undef HAVE_TIMEVAL - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getopt_long_only' function. */ -#undef HAVE_GETOPT_LONG_ONLY - -/* Preprocessor macros needed for gnulib imports. */ +/* Define to 1 if ALSA is available. */ +#undef HAVE_ALSA /* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ -#ifdef __GNUC__ -#define HAVE_ATTRIBUTE_ALIGNED 1 -#else #undef HAVE_ATTRIBUTE_ALIGNED -#endif /* Define to 1 if strtold conforms to C99. */ -#ifdef __GNUC__ -#define HAVE_C99_STRTOLD 1 -#else #undef HAVE_C99_STRTOLD -#endif + +/* Define to 1 if you have the `cbrt' function. */ +#undef HAVE_CBRT + +/* Define to 1 if you have the `cfmakeraw' function. */ +#undef HAVE_CFMAKERAW + +/* Define to 1 if you have the `cfsetspeed' function. */ +#undef HAVE_CFSETSPEED + +/* Define to 1 if you have the `clock_gettime' function. */ +#undef HAVE_CLOCK_GETTIME + +/* Define to 1 if you have the `clock_settime' function. */ +#undef HAVE_CLOCK_SETTIME + +/* Define to 1 if you have the `closedir' function. */ +#define HAVE_CLOSEDIR 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_COFF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_COM_ERR_H + +/* Define to 1 if you have the `copysign' function. */ +#undef HAVE_COPYSIGN + +/* Define to 1 if using D-Bus. */ +#undef HAVE_DBUS + +/* Define to 1 if you have the `dbus_type_is_valid' function. */ +#undef HAVE_DBUS_TYPE_IS_VALID + +/* Define to 1 if you have the `dbus_validate_bus_name' function. */ +#undef HAVE_DBUS_VALIDATE_BUS_NAME + +/* Define to 1 if you have the `dbus_validate_interface' function. */ +#undef HAVE_DBUS_VALIDATE_INTERFACE + +/* Define to 1 if you have the `dbus_validate_member' function. */ +#undef HAVE_DBUS_VALIDATE_MEMBER + +/* Define to 1 if you have the `dbus_validate_path' function. */ +#undef HAVE_DBUS_VALIDATE_PATH + +/* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */ +#undef HAVE_DBUS_WATCH_GET_UNIX_FD /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. */ @@ -272,8 +210,13 @@ don't. */ #undef HAVE_DECL_LOCALTIME_R -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R +/* Define to 1 if you have the declaration of `strmode', and to 0 if you + don't. */ +#undef HAVE_DECL_STRMODE + +/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you + don't. */ +#undef HAVE_DECL_STRTOIMAX /* Define to 1 if you have the declaration of `strtoll', and to 0 if you don't. */ @@ -287,58 +230,1175 @@ don't. */ #define HAVE_DECL_STRTOUMAX 1 +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#undef HAVE_DECL_SYS_SIGLIST + +/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. + */ +#define HAVE_DECL_TZNAME 1 + +/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you + don't. */ +#undef HAVE_DECL___SYS_SIGLIST + +/* Define to 1 if you have the header file. */ +#undef HAVE_DES_H + +/* Define to 1 if dynamic ptys are supported. */ +#undef HAVE_DEV_PTMX + +/* Define to 1 if you have the `difftime' function. */ +#undef HAVE_DIFFTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the 'dup2' function. */ +#define HAVE_DUP2 1 + +/* Define to 1 if you have the `endgrent' function. */ +#undef HAVE_ENDGRENT + +/* Define to 1 if you have the `endpwent' function. */ +#undef HAVE_ENDPWENT + +/* Define to 1 if you have the `euidaccess' function. */ +#undef HAVE_EUIDACCESS + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fmod' function. */ +#define HAVE_FMOD 1 + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the `fpathconf' function. */ +#undef HAVE_FPATHCONF + +/* Define to 1 if you have the `freeifaddrs' function. */ +#undef HAVE_FREEIFADDRS + +/* Define to 1 if using the freetype and fontconfig libraries. */ +#undef HAVE_FREETYPE + +/* Define to 1 if you have the `frexp' function. */ +#define HAVE_FREXP 1 + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#undef HAVE_FSEEKO + +/* Define to 1 if you have the `fsync' function. */ +#define HAVE_FSYNC 1 + +/* Define to 1 if you have the `futimens' function. */ +#undef HAVE_FUTIMENS + +/* Define to 1 if you have the `futimes' function. */ +#undef HAVE_FUTIMES + +/* Define to 1 if you have the `futimesat' function. */ +#undef HAVE_FUTIMESAT + +/* Define to 1 if you have the `gai_strerror' function. */ +#undef HAVE_GAI_STRERROR + +/* Define to 1 if using GConf. */ +#undef HAVE_GCONF + +/* Define to 1 if you have the `getaddrinfo' function. */ +#undef HAVE_GETADDRINFO + +/* Define to 1 if you have the `getcwd' function. + If you think about defining HAVE_GETCWD, don't: the alternative + getwd is redefined on w32.c, and does not really return the current + directory, to get the desired results elsewhere in Emacs. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the `getdelim' function. */ +#undef HAVE_GETDELIM + +/* Define to 1 if you have the `getgrent' function. */ +#undef HAVE_GETGRENT + +/* Define to 1 if you have the `gethostname' function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the `getifaddrs' function. */ +#undef HAVE_GETIFADDRS + +/* Define to 1 if you have the `getline' function. */ +#undef HAVE_GETLINE + +/* Define to 1 if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define to 1 if you have the `getopt_long_only' function. */ +#undef HAVE_GETOPT_LONG_ONLY + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getpeername' function. */ +#define HAVE_GETPEERNAME 1 + +/* Define to 1 if you have the `getpt' function. */ +#undef HAVE_GETPT + +/* Define to 1 if you have the `getpwent' function. */ +#undef HAVE_GETPWENT + +/* Define to 1 if you have the `getrlimit' function. */ +#undef HAVE_GETRLIMIT + +/* Define to 1 if you have the `getrusage' function. */ +#undef HAVE_GETRUSAGE + +/* Define to 1 if you have the `getsockname' function. */ +#define HAVE_GETSOCKNAME 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `getwd' function. */ +#undef HAVE_GETWD + +/* Define to 1 if you have the `get_current_dir_name' function. */ +#undef HAVE_GET_CURRENT_DIR_NAME + +/* Define to 1 if you have a gif (or ungif) library. */ +#undef HAVE_GIF + +/* Define if using GnuTLS. */ +#undef HAVE_GNUTLS + +/* Define if using GnuTLS certificate verification callbacks. */ +#undef HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY + +/* Define to 1 if you have the `gnutls_certificate_set_verify_function' + function. */ +#undef HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION + +/* Define to 1 if you have the gpm library (-lgpm). */ +#undef HAVE_GPM + +/* Define to 1 if you have the `grantpt' function. */ +#undef HAVE_GRANTPT + +/* Define to 1 if using GSettings. */ +#undef HAVE_GSETTINGS + +/* Define to 1 if using GTK 3 or later. */ +#undef HAVE_GTK3 + +/* Define to 1 if you have the `gtk_adjustment_get_page_size' function. */ +#undef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE + +/* Define to 1 if you have the `gtk_dialog_get_action_area' function. */ +#undef HAVE_GTK_DIALOG_GET_ACTION_AREA + +/* Define to 1 if you have the `gtk_file_selection_new' function. */ +#undef HAVE_GTK_FILE_SELECTION_NEW + +/* Define to 1 if you have the `gtk_main' function. */ +#undef HAVE_GTK_MAIN + +/* Define to 1 if you have the `gtk_orientable_set_orientation' function. */ +#undef HAVE_GTK_ORIENTABLE_SET_ORIENTATION + +/* Define to 1 if you have the `gtk_widget_get_mapped' function. */ +#undef HAVE_GTK_WIDGET_GET_MAPPED + +/* Define to 1 if you have the `gtk_widget_get_sensitive' function. */ +#undef HAVE_GTK_WIDGET_GET_SENSITIVE + +/* Define to 1 if you have the `gtk_widget_get_window' function. */ +#undef HAVE_GTK_WIDGET_GET_WINDOW + +/* Define to 1 if you have the `gtk_widget_set_has_window' function. */ +#undef HAVE_GTK_WIDGET_SET_HAS_WINDOW + +/* Define to 1 if you have the `gtk_window_set_has_resize_grip' function. */ +#undef HAVE_GTK_WINDOW_SET_HAS_RESIZE_GRIP + +/* Define to 1 if you have the `g_type_init' function. */ +#undef HAVE_G_TYPE_INIT + +/* Define to 1 if netdb.h declares h_errno. */ +#define HAVE_H_ERRNO 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_IFADDRS_H + +/* Define to 1 if using imagemagick. */ +#undef HAVE_IMAGEMAGICK + +/* Define to 1 if you have inet sockets. */ +#define HAVE_INET_SOCKETS 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the jpeg library (-ljpeg). */ +#undef HAVE_JPEG + +/* Define to 1 if you have the header file. */ +#undef HAVE_KERBEROSIV_DES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_KERBEROSIV_KRB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_KERBEROS_DES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_KERBEROS_KRB_H + +/* Define to 1 if `e_text' is a member of `krb5_error'. */ +#undef HAVE_KRB5_ERROR_E_TEXT + +/* Define to 1 if `text' is a member of `krb5_error'. */ +#undef HAVE_KRB5_ERROR_TEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_KRB5_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_KRB_H + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define to 1 if you have the `com_err' library (-lcom_err). */ +#undef HAVE_LIBCOM_ERR + +/* Define to 1 if you have the `crypto' library (-lcrypto). */ +#undef HAVE_LIBCRYPTO + +/* Define to 1 if you have the `des' library (-ldes). */ +#undef HAVE_LIBDES + +/* Define to 1 if you have the `des425' library (-ldes425). */ +#undef HAVE_LIBDES425 + +/* Define to 1 if you have the `dgc' library (-ldgc). */ +#undef HAVE_LIBDGC + +/* Define to 1 if you have the `dnet' library (-ldnet). */ +#undef HAVE_LIBDNET + +/* Define to 1 if you have the hesiod library (-lhesiod). */ +#undef HAVE_LIBHESIOD + +/* Define to 1 if you have the `k5crypto' library (-lk5crypto). */ +#undef HAVE_LIBK5CRYPTO + +/* Define to 1 if you have the `krb' library (-lkrb). */ +#undef HAVE_LIBKRB + +/* Define to 1 if you have the `krb4' library (-lkrb4). */ +#undef HAVE_LIBKRB4 + +/* Define to 1 if you have the `krb5' library (-lkrb5). */ +#undef HAVE_LIBKRB5 + +/* Define to 1 if you have the `kstat' library (-lkstat). */ +#undef HAVE_LIBKSTAT + +/* Define to 1 if you have the `lockfile' library (-llockfile). */ +#undef HAVE_LIBLOCKFILE + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `mail' library (-lmail). */ +#undef HAVE_LIBMAIL + +/* Define to 1 if using libotf. */ +#undef HAVE_LIBOTF + +/* Define to 1 if you have the `perfstat' library (-lperfstat). */ +#undef HAVE_LIBPERFSTAT + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBPNG_PNG_H + +/* Define to 1 if you have the `pthreads' library (-lpthreads). */ +#undef HAVE_LIBPTHREADS + +/* Define to 1 if you have the resolv library (-lresolv). */ +#undef HAVE_LIBRESOLV + +/* Define to 1 if using SELinux. */ +#undef HAVE_LIBSELINUX + +/* Define to 1 if you have the `Xext' library (-lXext). */ +#undef HAVE_LIBXEXT + +/* Define to 1 if you have the libxml library (-lxml2). */ +#undef HAVE_LIBXML2 + +/* Define to 1 if you have the `Xmu' library (-lXmu). */ +#undef HAVE_LIBXMU + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_VERSION_H + +/* Define to 1 if you have the `localtime_r' function. */ +#undef HAVE_LOCALTIME_R + +/* Define to 1 if you have the `logb' function. */ +#define HAVE_LOGB 1 + +/* Define to 1 if you support file names longer than 14 characters. */ +#define HAVE_LONG_FILE_NAMES 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#undef HAVE_LONG_LONG_INT + +/* Define to 1 if you have the `lrand48' function. */ +#undef HAVE_LRAND48 + +/* Define to 1 if you have the `lstat' function. */ +#undef HAVE_LSTAT + +/* Define to 1 if you have the `lutimes' function. */ +#undef HAVE_LUTIMES + +/* Define to 1 if using libm17n-flt. */ +#undef HAVE_M17N_FLT + +/* Define to 1 if you have the header file. */ +#undef HAVE_MACHINE_SOUNDCARD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MACH_MACH_H + +/* Define to 1 if you have the `MagickExportImagePixels' function. */ +#undef HAVE_MAGICKEXPORTIMAGEPIXELS + +/* Define to 1 if you have the `MagickMergeImageLayers' function. */ +#undef HAVE_MAGICKMERGEIMAGELAYERS + +/* Define to 1 if you have the header file. */ +#undef HAVE_MAILLOCK_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_MALLOC_H + +/* Define to 1 if declares mbstate_t. */ +#undef HAVE_MBSTATE_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have mouse menus. (This is automatic if you use X, but + the option to specify it remains.) It is also defined with other window + systems that support xmenu.c. */ +#undef HAVE_MENUS + +/* Define to 1 if you have the `mkdir' function. */ +#define HAVE_MKDIR 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if you have mouse support. */ +#define HAVE_MOUSE 1 + +/* Define to 1 if you have the `nanotime' function. */ +#undef HAVE_NANOTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_DL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NLIST_H + +/* Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on + Mac OS X. */ +#undef HAVE_NS + +/* Define to 1 if libotf has OTF_get_variation_glyphs. */ +#undef HAVE_OTF_GET_VARIATION_GLYPHS + +/* Define to 1 if personality LINUX32 can be set. */ +#undef HAVE_PERSONALITY_LINUX32 + +/* Define to 1 if you have the png library (-lpng). */ +#undef HAVE_PNG + +/* Define to 1 if you have the header file. */ +#undef HAVE_PNG_H + +/* Define to 1 if you have the `posix_memalign' function. */ +#undef HAVE_POSIX_MEMALIGN + +/* Define if you have the /proc filesystem. */ +#undef HAVE_PROCFS + +/* Define to 1 if you have the `pselect' function. */ +#undef HAVE_PSELECT + +/* Define to 1 if you have the `pstat_getdynamic' function. */ +#undef HAVE_PSTAT_GETDYNAMIC + +/* Define to 1 if you have pthread (-lpthread). */ +#undef HAVE_PTHREAD + +/* Define to 1 if you have the header file. */ +#undef HAVE_PTHREAD_H + +/* Define to 1 if the pthread_sigmask function can be used (despite bugs). */ +#undef HAVE_PTHREAD_SIGMASK + +/* Define to 1 if you have the header file. */ +#undef HAVE_PTY_H + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the `readlink' function. */ +#undef HAVE_READLINK + +/* Define to 1 if you have the `readlinkat' function. */ +#undef HAVE_READLINKAT + +/* Define to 1 if you have the `recvfrom' function. */ +#define HAVE_RECVFROM 1 + +/* Define to 1 if you have the `rename' function. */ +#define HAVE_RENAME 1 + +/* Define to 1 if res_init is available. */ +#undef HAVE_RES_INIT + +/* Define to 1 if you have the `rint' function. */ +#undef HAVE_RINT + +/* Define to 1 if you have the `rmdir' function. */ +#define HAVE_RMDIR 1 + +/* Define to 1 if using librsvg. */ +#undef HAVE_RSVG + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `sendto' function. */ +#define HAVE_SENDTO 1 + +/* Define to 1 if you have the `setitimer' function. */ +#undef HAVE_SETITIMER + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setpgid' function. */ +#undef HAVE_SETPGID + +/* Define to 1 if you have the `setrlimit' function. */ +#undef HAVE_SETRLIMIT + +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID + +/* Define to 1 if you have the `shutdown' function. */ +#define HAVE_SHUTDOWN 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +#undef HAVE_SIGNED_SIG_ATOMIC_T + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +#undef HAVE_SIGNED_WCHAR_T + +/* Define to 1 if 'wint_t' is a signed integer type. */ +#undef HAVE_SIGNED_WINT_T + +/* Define to 1 if the system has the type `sigset_t'. */ +#undef HAVE_SIGSET_T + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have sound support. */ +#define HAVE_SOUND 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_SOUNDCARD_H + +/* Define to 1 if `speed_t' is declared by . */ +#undef HAVE_SPEED_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_EXT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the `strsignal' function. */ +#undef HAVE_STRSIGNAL + +/* Define to 1 if you have the `strtoimax' function. */ +#undef HAVE_STRTOIMAX + +/* Define to 1 if you have the `strtoll' function. */ +#undef HAVE_STRTOLL + /* Define to 1 if you have the `strtoull' function. */ #define HAVE_STRTOULL 1 /* Define to 1 if you have the `strtoumax' function. */ #define HAVE_STRTOUMAX 1 +/* Define to 1 if `ifr_addr' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_ADDR + +/* Define to 1 if `ifr_addr.sa_len' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN + +/* Define to 1 if `ifr_broadaddr' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_BROADADDR + +/* Define to 1 if `ifr_flags' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_FLAGS + +/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_HWADDR + +/* Define to 1 if `ifr_netmask' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_NETMASK + +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ +#undef HAVE_STRUCT_NLIST_N_UN_N_NAME + +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMENSEC + +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC + +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC + +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC + +/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + +/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + +/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC + +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_ZONE + +/* Define if struct utimbuf is declared -- usually in . Some systems + have utime.h but don't declare the struct anywhere. */ +#undef HAVE_STRUCT_UTIMBUF + +/* Define if struct stat has an st_dm_mode member. */ +#undef HAVE_ST_DM_MODE + +/* Define to 1 if you have the `symlink' function. */ +#undef HAVE_SYMLINK + +/* Define to 1 if you have the `sync' function. */ +#undef HAVE_SYNC + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_BITYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_LOADAVG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOUNDCARD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSTEMINFO_H + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMEB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VLIMIT_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TERM_H + +/* Define to 1 if you have the tiff library (-ltiff). */ +#undef HAVE_TIFF + +/* Define if struct tm has the tm_gmtoff member. */ +#undef HAVE_TM_GMTOFF + +/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ +#undef HAVE_TM_ZONE + +/* Define to 1 if you have the `touchlock' function. */ +#undef HAVE_TOUCHLOCK + +/* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ +#define HAVE_TZNAME 1 + +/* Define to 1 if you have the `tzset' function. */ +#define HAVE_TZSET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIL_H + +/* Define to 1 if you have the `utimensat' function. */ +#undef HAVE_UTIMENSAT + +/* Define to 1 if you have the `utimes' function. */ +#undef HAVE_UTIMES + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTMP_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WCHAR_H + /* Define if you have the 'wchar_t' type. */ #define HAVE_WCHAR_T 1 +/* Define if you have a window system. */ +#undef HAVE_WINDOW_SYSTEM + +/* Define to 1 if you have the header file. */ +#undef HAVE_WINSOCK2_H + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define if utimes works properly. */ +#undef HAVE_WORKING_UTIMES + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + +/* Define to 1 if you want to use version 11 of X windows. Otherwise, Emacs + expects to use version 10. */ +#undef HAVE_X11 + +/* Define to 1 if you have the X11R6 or newer version of Xlib. */ +#undef HAVE_X11R6 + +/* Define if you have usable X11R6-style XIM support. */ +#undef HAVE_X11R6_XIM + +/* Define to 1 if you have the X11R6 or newer version of Xt. */ +#undef HAVE_X11XTR6 + +/* Define to 1 if you have the Xaw3d library (-lXaw3d). */ +#undef HAVE_XAW3D + +/* Define to 1 if you have the Xft library. */ +#undef HAVE_XFT + +/* Define to 1 if XIM is available */ +#undef HAVE_XIM + +/* Define to 1 if you have the XkbGetKeyboard function. */ +#undef HAVE_XKBGETKEYBOARD + +/* Define to 1 if you have the Xpm library (-lXpm). */ +#undef HAVE_XPM + +/* Define to 1 if you have the `XrmSetDatabase' function. */ +#undef HAVE_XRMSETDATABASE + +/* Define to 1 if you have the `XScreenNumberOfScreen' function. */ +#undef HAVE_XSCREENNUMBEROFSCREEN + +/* Define to 1 if you have the `XScreenResourceString' function. */ +#undef HAVE_XSCREENRESOURCESTRING + +/* Define if you have usable i18n support. */ +#undef HAVE_X_I18N + +/* Define to 1 if you have the SM library (-lSM). */ +#undef HAVE_X_SM + +/* Define to 1 if you want to use the X window system. */ +#undef HAVE_X_WINDOWS + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to 1 if you have the `_ftime' function. */ +#undef HAVE__FTIME + +/* Define to 1 if you have the `__builtin_unwind_init' function. */ +#undef HAVE___BUILTIN_UNWIND_INIT + +/* Define to 1 if you have the `__executable_start' function. */ +#undef HAVE___EXECUTABLE_START + +/* Define to 1 if you have the `__fpending' function. */ +#undef HAVE___FPENDING + +/* Define to support using a Hesiod database to find the POP server. */ +#undef HESIOD + +/* Define to support Kerberos-authenticated POP mail retrieval. */ +#undef KERBEROS + +/* Define to use Kerberos 5 instead of Kerberos 4. */ +#undef KERBEROS5 + +/* Define to 1 if localtime caches TZ. */ +#define LOCALTIME_CACHE 1 + +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing + slash. */ +#undef LSTAT_FOLLOWS_SLASHED_SYMLINK + +/* String giving fallback POP mail host. */ +#undef MAILHOST + +/* Define to unlink, rather than empty, mail spool after reading. */ +#undef MAIL_UNLINK_SPOOL + +/* Define if the mailer uses flock to interlock the mail spool. */ +#undef MAIL_USE_FLOCK + +/* Define if the mailer uses lockf to interlock the mail spool. */ +#undef MAIL_USE_LOCKF + +/* Define to support MMDF mailboxes in movemail. */ +#undef MAIL_USE_MMDF + +/* Define to support POP mail retrieval. */ +#define MAIL_USE_POP 1 + +/* Define to 1 if you don't have struct exception in math.h. */ +#define NO_MATHERR 1 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Define if termio.h should not be included. */ +#undef NO_TERMIO + +/* Define to 1 if `NSInteger' is defined. */ +#undef NS_HAVE_NSINTEGER + +/* Define to 1 if you are using NS windowing under MacOS X. */ +#undef NS_IMPL_COCOA + +/* Define to 1 if you are using NS windowing under GNUstep. */ +#undef NS_IMPL_GNUSTEP + +/* Define to 1 if the nlist n_name member is a pointer */ +#undef N_NAME_POINTER + +/* Define if the C compiler is the linker. */ +#define ORDINARY_LINK 1 + /* Name of package */ #define PACKAGE "emacs" +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno. + */ +#undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO + +/* Define to 1 if pthread_sigmask() may returns 0 and have no effect. */ +#undef PTHREAD_SIGMASK_INEFFECTIVE + +/* Define to 1 if pthread_sigmask() unblocks signals incorrectly. */ +#undef PTHREAD_SIGMASK_UNBLOCK_BUG + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#undef PTRDIFF_T_SUFFIX + +/* Define to 1 if readlink fails to recognize a trailing slash. */ +#undef READLINK_TRAILING_SLASH_BUG + +/* Define REL_ALLOC if you want to use the relocating allocator for buffer + space. */ +#define REL_ALLOC 1 + +/* Define to 1 if stat needs help when passed a directory name with a trailing + slash */ +#undef REPLACE_FUNC_STAT_DIR + +/* Define to 1 if stat needs help when passed a file name with a trailing + slash */ +#undef REPLACE_FUNC_STAT_FILE + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +#undef SIG_ATOMIC_T_SUFFIX + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +#undef SIZE_T_SUFFIX + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +#undef STAT_MACROS_BROKEN + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 on System V Release 4. */ +#undef SVR4 + +/* Process async input synchronously. */ +#undef SYNC_INPUT + +/* Define to use system malloc. */ +#undef SYSTEM_MALLOC + +/* The type of system you are compiling for; sets `system-type'. */ +#define SYSTEM_TYPE "windows-nt" + +/* Define to 1 if you use terminfo instead of termcap. */ +#undef TERMINFO + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define to 1 if the type of the st_atim member of a struct stat is struct + timespec. */ +#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC + +/* Define to 1 for Encore UMAX. */ +#undef UMAX + +/* Define to 1 for Encore UMAX 4.3 that has instead of + . */ +#undef UMAX4_3 + +/* Define to 1 if using GTK. */ +#undef USE_GTK + +/* Define to 1 if using the Lucid X toolkit. */ +#undef USE_LUCID + +/* Define to use mmap to allocate buffer text. */ +#undef USE_MMAP_FOR_BUFFERS + +/* Define to 1 if using the Motif X toolkit. */ +#undef USE_MOTIF + +/* Define to 1 if we should use toolkit scroll bars. */ +#define USE_TOOLKIT_SCROLL_BARS 1 + +/* Define to 1 if we should use XIM, if it is available. */ +#undef USE_XIM + +/* Define to 1 if using an X toolkit. */ +#undef USE_X_TOOLKIT + +/* Define for USG systems where it works to open a pty's tty in the parent + process, then close and reopen it in the child. */ +#undef USG_SUBTTY_WORKS + /* Version number of package */ #define VERSION "24.1.50" -/* The type of system you are compiling for; sets `system-type'. */ -#define SYSTEM_TYPE "windows-nt" +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +#undef WCHAR_T_SUFFIX + +/* Use long long for EMACS_INT if available. */ +/* #undef WIDE_EMACS_INT */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +#undef WINT_T_SUFFIX + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define this to check for malloc buffer overrun. */ +#undef XMALLOC_OVERRUN_CHECK + +/* Define to the type of the 6th arg of XRegisterIMInstantiateCallback, either + XPointer or XPointer*. */ +#undef XRegisterIMInstantiateCallback_arg6 + +/* Enable large inode numbers on Mac OS X. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* enable compile-time and run-time bounds-checking, and some warnings */ +#undef _FORTIFY_SOURCE + +/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct + stat.st_size becomes 64-bit. */ +#undef _GL_WINDOWS_64_BIT_ST_SIZE + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +#undef _LARGEFILE_SOURCE + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define if GNUstep uses ObjC exceptions. */ +#undef _NATIVE_OBJC_EXCEPTIONS + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__)) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Needed for system_process_attributes on Solaris. */ +#undef _STRUCTURED_PROC + +/* Define to 500 only on HP-UX. */ +#undef _XOPEN_SOURCE + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable general extensions on Mac OS X. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +#undef __GETOPT_PREFIX + +/* Define to compiler's equivalent of C99 restrict keyword in array + declarations. Define as empty for no equivalent. */ +#undef __restrict_arr + +/* Define to the used os dependent file. */ +#define config_opsysfile "s/ms-w32.h" + +/* A replacement for va_copy, if needed. */ +#define gl_va_copy(a,b) ((a) = (b)) + +/* Define to rpl_gmtime if the replacement function should be used. */ +#undef gmtime /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ -#ifdef __GNUC__ #ifndef __cplusplus #undef inline #endif -#else /* MSVC */ -#define inline __inline + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 #endif +/* Define to 1 if the compiler is checking for lint. */ +#undef lint + +/* Define to rpl_localtime if the replacement function should be used. */ +#undef localtime + +/* Define to a type if does not define. */ +#undef mbstate_t + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define to the name of the strftime replacement function. */ +#define my_strftime nstrftime + +/* Define to the type of st_nlink in struct stat, or a supertype. */ +#define nlink_t short + +/* Define to `int' if does not define. */ +#undef pid_t + /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ -#ifdef __GNUC__ -# define restrict __restrict__ -#else -# define restrict -#endif - -/* `mode_t' is not defined for MSVC. Define. */ -#ifdef _MSC_VER -typedef unsigned short mode_t; -#endif - -/* A va_copy replacement for MSVC. */ -#ifdef _MSC_VER -# ifdef _WIN64 -# ifndef va_copy /* Need to be checked (?) */ -# define va_copy(d,s) ((d) = (s)) -# endif -# else /* not _WIN64 */ -# define va_copy(d,s) ((d) = (s)) -# endif /* not _WIN64 */ -#endif /* _MSC_VER */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* type to use in place of socklen_t if not defined */ +#undef socklen_t + +/* Define as a signed type of the same size as size_t. */ +#undef ssize_t + +/* Define to any substitute for sys_siglist. */ +#undef sys_siglist /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from @@ -352,7 +1412,69 @@ is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED -/* End of gnulib-related stuff. */ +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + + +/* Define as a macro for copying va_list variables. */ +#undef va_copy + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork + + +/* Define AMPERSAND_FULL_NAME if you use the convention + that & in the full name stands for the login id. */ +#undef AMPERSAND_FULL_NAME + +/* `subprocesses' should be defined if you want to + have code for asynchronous subprocesses + (as used in M-x compile and M-x shell). + Only MSDOS does not support this (it overrides + this in its config_opsysfile below). */ + +#define subprocesses + +/* Include the os dependent file. */ +#ifdef config_opsysfile +# include config_opsysfile +#endif + +/* GNUstep needs a bit more pure memory. Of the existing knobs, + SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. + (There is probably a better place to do this, but right now the + Cocoa side does this in s/darwin.h and we cannot parallel this + exactly since GNUstep is multi-OS. */ +#if defined HAVE_NS && defined NS_IMPL_GNUSTEP +# define SYSTEM_PURESIZE_EXTRA 30000 +#endif + +#ifdef emacs /* Don't do this for lib-src. */ +/* Tell regex.c to use a type compatible with Emacs. */ +#define RE_TRANSLATE_TYPE Lisp_Object +#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) +#ifdef make_number +/* If make_number is a macro, use it. */ +#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0))) +#else +/* If make_number is a function, avoid it. */ +#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0)) +#endif +#endif + +#include +#include #if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ #define NO_INLINE __attribute__((noinline)) @@ -380,118 +1502,38 @@ ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) #endif +/* Some versions of GNU/Linux define noinline in their headers. */ +#ifdef noinline +#undef noinline +#endif + +/* These won't be used automatically yet. We also need to know, at least, + that the stack is continuous. */ +#ifdef __GNUC__ +# ifndef GC_SETJMP_WORKS + /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ +# define GC_SETJMP_WORKS 1 +# endif +#endif + +/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ +#ifdef __GNUC__ +#define HAVE_ATTRIBUTE_ALIGNED 1 +#endif + +/* Define to 1 if strtold conforms to C99. */ +#ifdef __GNUC__ +#define HAVE_C99_STRTOLD 1 +#endif + #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) #define HAVE___BUILTIN_UNWIND_INIT 1 #endif -#undef EMACS_CONFIGURATION - -#undef EMACS_CONFIG_OPTIONS - -/* The configuration script defines opsysfile to be the name of the - s/SYSTEM.h file that describes the system type you are using. The file - is chosen based on the configuration name you give. - - See the file ../etc/MACHINES for a list of systems and the - configuration names to use for them. - - See s/template.h for documentation on writing s/SYSTEM.h files. */ -#undef config_opsysfile -#include "s/ms-w32.h" - -/* Define `subprocesses' should be defined if you want to - have code for asynchronous subprocesses - (as used in M-x compile and M-x shell). - Only MSDOS does not support this. */ - -#define subprocesses - -/* Define STACK_DIRECTION here, but not if m/foo.h did. */ -#ifndef STACK_DIRECTION -#undef STACK_DIRECTION -#endif - -#ifdef emacs /* Don't do this for lib-src. */ -/* Tell regex.c to use a type compatible with Emacs. */ -#define RE_TRANSLATE_TYPE Lisp_Object -#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) -#define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0) -#endif - -#define my_strftime nstrftime /* for strftime.c */ - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t short - -#ifndef WINDOWSNT -/* Some of the files of Emacs which are intended for use with other - programs assume that if you have a config.h file, you must declare - the type of getenv. */ -extern char *getenv (); -#endif - #endif /* EMACS_CONFIG_H */ -#if defined (__MINGW32__) || _MSC_VER >= 1400 - -/* Define to 1 if the system has the type `long long int'. */ -# define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if the system has the type `unsigned long long int'. */ -# define HAVE_UNSIGNED_LONG_LONG_INT 1 - -#elif _MSC_VER >= 1200 - -/* Temporarily disable wider-than-pointer integers until they're tested more. - Build with CFLAGS='-DWIDE_EMACS_INT' to try them out. */ -/* #undef WIDE_EMACS_INT */ - -# ifdef WIDE_EMACS_INT - -/* Use pre-C99-style 64-bit integers. */ -# define EMACS_INT __int64 -# define EMACS_INT_MAX _I64_MAX -# define pI "I64" - -# endif - -#endif - -#ifndef POINTER_TYPE -#define POINTER_TYPE void -#endif - -#ifndef PROTOTYPES -#define PROTOTYPES 1 -#endif - -#include "string.h" -#ifdef HAVE_STRINGS_H -#include "strings.h" -#endif -#include - -/* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__)) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - -/* Redefine abort. */ -#ifdef HAVE_NTGUI -#define abort w32_abort -_Noreturn void w32_abort (void); -#endif - -/* Prevent accidental use of features unavailable in - older Windows versions we still support. */ -#define _WIN32_WINNT 0x0400 - -/* Make a leaner executable. */ -#define WIN32_LEAN_AND_MEAN 1 +/* +Local Variables: +mode: c +End: +*/ === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 16:57:32 +0000 +++ src/ChangeLog 2012-07-06 17:19:33 +0000 @@ -1,3 +1,10 @@ +2012-07-06 Juanma Barranquero + Eli Zaretskii + + * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt. + Windows-specific code from nt/config.nt moved here. + Obsolete settings removed. + 2012-07-06 Paul Eggert * process.c: Avoid unnecessary calls to gettime. === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2012-07-04 16:46:42 +0000 +++ src/s/ms-w32.h 2012-07-06 17:19:33 +0000 @@ -27,6 +27,8 @@ #define DOS_NT /* MSDOS or WINDOWSNT */ #endif +/* #undef const */ + /* If you are compiling with a non-C calling convention but need to declare vararg routines differently, put it here. */ #define _VARARGS_ __cdecl @@ -36,8 +38,6 @@ convention must be whatever standard the libraries expect. */ #define _CALLBACK_ __cdecl -#define NO_MATHERR 1 - /* Letter to use in finding device name of first pty, if system supports pty's. 'a' means it is /dev/ptya0 */ #define FIRST_PTY_LETTER 'a' @@ -57,15 +57,19 @@ for received packets, so datagrams are broken too. */ #define BROKEN_DATAGRAM_SOCKETS 1 -#define MAIL_USE_POP 1 +/* MSVC ignores the "register" keyword, so test fails even though + setjmp does work. */ +#define GC_SETJMP_WORKS 1 + +/* Enable conservative stack marking for GC. */ +#define GC_MARK_STACK 1 + #define MAIL_USE_SYSTEM_LOCK 1 /* If the character used to separate elements of the executable path is not ':', #define this to be the appropriate character constant. */ #define SEPCHAR ';' -#define ORDINARY_LINK 1 - /* ============================================================ */ /* Here, add any special hacks needed to make Emacs work on this @@ -81,6 +85,46 @@ #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) +#ifdef __GNUC__ +#ifndef __cplusplus +#undef inline +#endif +#else /* MSVC */ +#define inline __inline +#endif + +#ifdef __GNUC__ +# define restrict __restrict__ +#else +# define restrict +#endif + +/* `mode_t' is not defined for MSVC. Define. */ +#ifdef _MSC_VER +typedef unsigned short mode_t; +#endif + +/* A va_copy replacement for MSVC. */ +#ifdef _MSC_VER +# ifdef _WIN64 +# ifndef va_copy /* Need to be checked (?) */ +# define va_copy(d,s) ((d) = (s)) +# endif +# else /* not _WIN64 */ +# define va_copy(d,s) ((d) = (s)) +# endif /* not _WIN64 */ +#endif /* _MSC_VER */ + +#ifndef WINDOWSNT +/* Some of the files of Emacs which are intended for use with other + programs assume that if you have a config.h file, you must declare + the type of getenv. */ +extern char *getenv (); +#endif + +#ifdef HAVE_STRINGS_H +#include "strings.h" +#endif #include #ifdef _MSC_VER @@ -104,79 +148,11 @@ #define MAXPATHLEN _MAX_PATH #endif -#define HAVE_SOUND 1 - -#define HAVE_SYS_TIMEB_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_UNISTD_H 1 -#undef HAVE_UTIME_H -#undef HAVE_LINUX_VERSION_H -#undef HAVE_SYS_SYSTEMINFO_H -#define HAVE_PWD_H 1 -#define TIME_WITH_SYS_TIME 1 - -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_GETHOSTNAME 1 -#define HAVE_DUP2 1 -#define HAVE_RENAME 1 -#define HAVE_CLOSEDIR 1 -#define HAVE_FSYNC 1 /* fsync is called _commit in MSVC. */ - -#undef TM_IN_SYS_TIME -#undef HAVE_TM_ZONE - -#define HAVE_LONG_FILE_NAMES 1 - -#define HAVE_MKDIR 1 -#define HAVE_RMDIR 1 -#define HAVE_RANDOM 1 -#undef HAVE_SYSINFO -#undef HAVE_LRAND48 -#define HAVE_LOGB 1 -#define HAVE_FREXP 1 -#define HAVE_FMOD 1 -#undef HAVE_RINT -#undef HAVE_CBRT -#undef HAVE_RES_INIT /* For -lresolv on Suns. */ -#undef HAVE_SETSID -#undef HAVE_FPATHCONF -#define HAVE_SELECT 1 -#undef HAVE_EUIDACCESS -#define HAVE_GETPAGESIZE 1 -#define HAVE_TZSET 1 -#define HAVE_SETLOCALE 1 -#undef HAVE_UTIMES -#undef HAVE_SETRLIMIT -#undef HAVE_SETPGID -/* If you think about defining HAVE_GETCWD, don't: the alternative - getwd is redefined on w32.c, and does not really return the current - directory, to get the desired results elsewhere in Emacs */ -#undef HAVE_GETCWD -#define HAVE_SHUTDOWN 1 - -#define LOCALTIME_CACHE -#define HAVE_INET_SOCKETS 1 - -#undef HAVE_AIX_SMT_EXP -#define USE_TOOLKIT_SCROLL_BARS 1 - /* MinGW has these in its library; MSVC doesn't. */ #ifdef _MSC_VER #define strcasecmp(s1,s2) _stricmp(s1,s2) #define strncasecmp(s1,s2) _strnicmp(s1,s2) #endif -#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 - -/* Define if you have the ANSI `strerror' function. - Otherwise you must have the variable `char *sys_errlist[]'. */ -#define HAVE_STRERROR 1 - -/* Define if `struct utimbuf' is declared by . */ -#undef HAVE_STRUCT_UTIMBUF - -#define HAVE_MOUSE 1 -#define HAVE_H_ERRNO 1 #ifdef HAVE_NTGUI #define HAVE_WINDOW_SYSTEM 1 @@ -354,6 +330,13 @@ #define _WINSOCKAPI_ 1 #define _WINSOCK_H +/* Prevent accidental use of features unavailable in + older Windows versions we still support. */ +#define _WIN32_WINNT 0x0400 + +/* Make a leaner executable. */ +#define WIN32_LEAN_AND_MEAN 1 + /* Defines size_t and alloca (). */ #ifdef emacs #define malloc e_malloc @@ -367,6 +350,16 @@ #include #endif +/* stdlib.h must be included after redefining malloc & friends, but + before redefining abort. Isn't library redefinition funny? */ +#include + +/* Redefine abort. */ +#ifdef HAVE_NTGUI +#define abort w32_abort +extern _Noreturn void w32_abort (void); +#endif + #include /* Define for those source files that do not include enough NT system files. */ @@ -379,14 +372,36 @@ #endif /* For proper declaration of environ. */ -#include #ifndef sys_nerr #define sys_nerr _sys_nerr #endif -#include extern int getloadavg (double *, int); +#if defined (__MINGW32__) || _MSC_VER >= 1400 + +/* Define to 1 if the system has the type `long long int'. */ +# define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if the system has the type `unsigned long long int'. */ +# define HAVE_UNSIGNED_LONG_LONG_INT 1 + +#elif _MSC_VER >= 1200 + +/* Temporarily disable wider-than-pointer integers until they're tested more. + Build with CFLAGS='-DWIDE_EMACS_INT' to try them out. */ + +# ifdef WIDE_EMACS_INT + +/* Use pre-C99-style 64-bit integers. */ +# define EMACS_INT __int64 +# define EMACS_INT_MAX _I64_MAX +# define pI "I64" + +# endif + +#endif + /* We need a little extra space, see ../../lisp/loadup.el. */ #define SYSTEM_PURESIZE_EXTRA 50000 @@ -424,5 +439,4 @@ #define DebPrint(stuff) #endif - /* ============================================================ */ ------------------------------------------------------------ revno: 108914 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 09:57:32 -0700 message: * process.c: Avoid unnecessary calls to gettime. (wait_reading_process_output): Don't get the time of day when gobbling data immediately and not waiting, as there's no need for it in that case. This removes a FIXME. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 15:46:51 +0000 +++ src/ChangeLog 2012-07-06 16:57:32 +0000 @@ -1,3 +1,10 @@ +2012-07-06 Paul Eggert + + * process.c: Avoid unnecessary calls to gettime. + (wait_reading_process_output): Don't get the time of day + when gobbling data immediately and not waiting, as there's no need + for it in that case. This removes a FIXME. + 2012-07-06 Jan Djärv * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3 === modified file 'src/process.c' --- src/process.c 2012-07-05 18:35:48 +0000 +++ src/process.c 2012-07-06 16:57:32 +0000 @@ -4307,7 +4307,7 @@ /* Since we may need to wait several times, compute the absolute time to return at. */ - if (time_limit || nsecs) /* FIXME neither should be negative, no? */ + if (time_limit || 0 < nsecs) { EMACS_GET_TIME (end_time); EMACS_SET_SECS_NSECS (timeout, time_limit, nsecs); @@ -4336,13 +4336,13 @@ /* Exit if already run out */ if (nsecs < 0) { - /* -1 specified for timeout means + /* A negative timeout means gobble output available now but don't wait at all. */ EMACS_SET_SECS_USECS (timeout, 0, 0); } - else if (time_limit || nsecs) + else if (time_limit || 0 < nsecs) { EMACS_GET_TIME (timeout); if (EMACS_TIME_LE (end_time, timeout)) @@ -4393,7 +4393,7 @@ && requeued_events_pending_p ()) break; - /* If time_limit is negative, we are not going to wait at all. */ + /* A negative timeout means do not wait at all. */ if (0 <= nsecs) { if (EMACS_TIME_VALID_P (timer_delay)) @@ -4661,7 +4661,7 @@ do_pending_window_change (0); if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers) - /* We wanted the full specified time, so return now. */ + /* We waited the full specified time, so return now. */ break; if (nfds < 0) { @@ -6855,7 +6855,7 @@ time_limit = TYPE_MAXIMUM (time_t); /* What does time_limit really mean? */ - if (time_limit || nsecs) /* FIXME: what if negative? */ + if (time_limit || 0 < nsecs) { EMACS_GET_TIME (end_time); EMACS_SET_SECS_NSECS (timeout, time_limit, nsecs); @@ -6886,13 +6886,13 @@ /* Exit if already run out */ if (nsecs < 0) { - /* -1 specified for timeout means + /* A negative timeout means gobble output available now but don't wait at all. */ EMACS_SET_SECS_USECS (timeout, 0, 0); } - else if (time_limit || nsecs) + else if (time_limit || 0 < nsecs) { EMACS_GET_TIME (timeout); if (EMACS_TIME_LE (end_time, timeout)) ------------------------------------------------------------ revno: 108913 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-07-06 08:46:51 -0700 message: Fix stray '<' from last change. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 15:02:29 +0000 +++ src/ChangeLog 2012-07-06 15:46:51 +0000 @@ -127,7 +127,7 @@ (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3. (is_box_type): New function (Bug#11768). (xg_tool_item_stale_p): Call is_box_type. - (xg_initialize): Get settings by calli ------------------------------------------------------------ revno: 108912 fixes bug(s): http://debbugs.gnu.org/11768 committer: Jan D. branch nick: trunk timestamp: Fri 2012-07-06 17:02:29 +0200 message: * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3 is defined. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 14:16:54 +0000 +++ src/ChangeLog 2012-07-06 15:02:29 +0000 @@ -1,3 +1,8 @@ +2012-07-06 Jan Djärv + + * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3 + is defined (Bug#11768). + 2012-07-06 Dmitry Antipov Fix marker debugging code. @@ -122,7 +127,7 @@ (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3. (is_box_type): New function (Bug#11768). (xg_tool_item_stale_p): Call is_box_type. - (xg_initialize): Get settings by calling gtk_settings_get_for_screen + (xg_initialize): Get settings by calli === modified file 'src/gtkutil.c' --- src/gtkutil.c 2012-07-05 18:35:48 +0000 +++ src/gtkutil.c 2012-07-06 15:02:29 +0000 @@ -3730,7 +3730,7 @@ #ifdef HAVE_GTK3 GdkDevice *gdev = gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gdpy)); - gdk_device_get_window_at_position (gdev, NULL, NULL); + gwin = gdk_device_get_window_at_position (gdev, NULL, NULL); #else gwin = gdk_display_get_window_at_pointer (gdpy, NULL, NULL); #endif ------------------------------------------------------------ revno: 108911 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2012-07-06 18:16:54 +0400 message: Fix marker debugging code. * marker.c (byte_char_debug_check): Do not perform the check if buffer is not multibyte. (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Call byte_char_debug_check with correct arguments. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 09:20:41 +0000 +++ src/ChangeLog 2012-07-06 14:16:54 +0000 @@ -1,5 +1,13 @@ 2012-07-06 Dmitry Antipov + Fix marker debugging code. + * marker.c (byte_char_debug_check): Do not perform the check + if buffer is not multibyte. + (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Call + byte_char_debug_check with correct arguments. + +2012-07-06 Dmitry Antipov + Compile marker debugging code only if ENABLE_CHECKING is defined. * marker.c (byte_char_debug_check, count_markers): Use only if ENABLE_CHECKING is defined. === modified file 'src/marker.c' --- src/marker.c 2012-07-06 09:20:41 +0000 +++ src/marker.c 2012-07-06 14:16:54 +0000 @@ -38,15 +38,17 @@ static void byte_char_debug_check (struct buffer *b, ptrdiff_t charpos, ptrdiff_t bytepos) { - ptrdiff_t nchars = 0; + ptrdiff_t nchars; + + if (NILP (BVAR (b, enable_multibyte_characters))) + return; if (bytepos > BUF_GPT_BYTE (b)) - { - nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b), - BUF_GPT_BYTE (b) - BUF_BEG_BYTE (b)); - nchars += multibyte_chars_in_text (BUF_GAP_END_ADDR (b), - bytepos - BUF_GPT_BYTE (b)); - } + nchars + = multibyte_chars_in_text (BUF_BEG_ADDR (b), + BUF_GPT_BYTE (b) - BUF_BEG_BYTE (b)) + + multibyte_chars_in_text (BUF_GAP_END_ADDR (b), + bytepos - BUF_GPT_BYTE (b)); else nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b), bytepos - BUF_BEG_BYTE (b)); @@ -197,7 +199,7 @@ if (record) build_marker (b, best_below, best_below_byte); - byte_char_debug_check (b, charpos, best_below_byte); + byte_char_debug_check (b, best_below, best_below_byte); cached_buffer = b; cached_modiff = BUF_MODIFF (b); @@ -222,7 +224,7 @@ if (record) build_marker (b, best_above, best_above_byte); - byte_char_debug_check (b, charpos, best_above_byte); + byte_char_debug_check (b, best_above, best_above_byte); cached_buffer = b; cached_modiff = BUF_MODIFF (b); @@ -363,7 +365,7 @@ if (record && BUF_MARKERS (b)) build_marker (b, best_below, best_below_byte); - byte_char_debug_check (b, best_below, bytepos); + byte_char_debug_check (b, best_below, best_below_byte); cached_buffer = b; cached_modiff = BUF_MODIFF (b); @@ -390,7 +392,7 @@ if (record && BUF_MARKERS (b)) build_marker (b, best_above, best_above_byte); - byte_char_debug_check (b, best_above, bytepos); + byte_char_debug_check (b, best_above, best_above_byte); cached_buffer = b; cached_modiff = BUF_MODIFF (b); ------------------------------------------------------------ revno: 108910 committer: Michael Albinus branch nick: trunk timestamp: Fri 2012-07-06 15:19:33 +0200 message: * tramp.texi (Multi-hops): Introduce `tramp-restricted-shell-hosts-alist'. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-06-26 22:52:31 +0000 +++ doc/misc/ChangeLog 2012-07-06 13:19:33 +0000 @@ -1,3 +1,8 @@ +2012-07-06 Michael Albinus + + * tramp.texi (Multi-hops): Introduce + `tramp-restricted-shell-hosts-alist'. + 2012-06-26 Lars Magne Ingebrigtsen * gnus.texi (POP before SMTP): POP-before-SMTP works with all sending === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2012-06-11 13:03:39 +0000 +++ doc/misc/tramp.texi 2012-07-06 13:19:33 +0000 @@ -1327,19 +1327,21 @@ @cindex multi-hop @cindex proxy hosts -Sometimes, the methods described before are not sufficient. Sometimes, -it is not possible to connect to a remote host using a simple command. -For example, if you are in a secured network, you might have to log in -to a `bastion host' first before you can connect to the outside world. -Of course, the target host may also require a bastion host. +Sometimes, the methods described before are not sufficient. +Sometimes, it is not possible to connect to a remote host using a +simple command. For example, if you are in a secured network, you +might have to log in to a bastion host first before you can connect to +the outside world. Of course, the target host may also require a +bastion host. @vindex tramp-default-proxies-alist -In order to specify such multiple hops, it is possible to define a proxy +@defopt tramp-default-proxies-alist +In order to specify multiple hops, it is possible to define a proxy host to pass through, via the variable @code{tramp-default-proxies-alist}. This variable keeps a list of triples (@var{host} @var{user} @var{proxy}). - The first matching item specifies the proxy host to be passed for a +The first matching item specifies the proxy host to be passed for a file name located on a remote target matching @var{user}@@@var{host}. @var{host} and @var{user} are regular expressions or @code{nil}, which is interpreted as a regular expression which always matches. @@ -1442,6 +1444,26 @@ Gateway methods can be declared as first hop only in a multiple hop chain. @end ifset +@end defopt + +Hops to be passed tend to be restricted firewalls and alike. +Sometimes they offer limited features only, like running @command{rbash} +(restricted bash). This must be told to @value{tramp}. + +@vindex tramp-restricted-shell-hosts-alist +@defopt tramp-restricted-shell-hosts-alist +This variable keeps a list of regular expressions, which denote hosts +running a registered shell like "rbash". Those hosts can be used as +proxies only. + +If the bastion host from the example above runs a restricted shell, +you shall apply + +@lisp +(add-to-list 'tramp-restricted-shell-hosts-alist + "\\`bastion\\.your\\.domain\\'") +@end lisp +@end defopt @node Customizing Methods ------------------------------------------------------------ revno: 108909 committer: Michael Albinus branch nick: trunk timestamp: Fri 2012-07-06 15:16:13 +0200 message: * net/tramp.el (tramp-restricted-shell-hosts-alist): New defcustom. * net/tramp-sh.el (tramp-maybe-open-connection): Handle it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-06 07:08:10 +0000 +++ lisp/ChangeLog 2012-07-06 13:16:13 +0000 @@ -1,3 +1,9 @@ +2012-07-06 Michael Albinus + + * net/tramp.el (tramp-restricted-shell-hosts-alist): New defcustom. + + * net/tramp-sh.el (tramp-maybe-open-connection): Handle it. + 2012-07-06 Glenn Morris * Makefile.in (compile-one-process): Rename from "recompile". === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2012-07-05 06:57:57 +0000 +++ lisp/net/tramp-sh.el 2012-07-06 13:16:13 +0000 @@ -4340,7 +4340,8 @@ (set-process-sentinel p 'tramp-process-sentinel) (tramp-compat-set-process-query-on-exit-flag p nil) (setq tramp-current-connection - (cons (butlast (append vec nil)) (current-time))) + (cons (butlast (append vec nil)) (current-time)) + tramp-current-host (system-name)) (tramp-message vec 6 "%s" (mapconcat 'identity (process-command p) " ")) @@ -4387,7 +4388,7 @@ (expand-file-name tramp-temp-name-prefix (tramp-compat-temporary-file-directory))))) - spec) + spec r-shell) ;; Add arguments for asynchronous processes. (when (and process-name async-args) @@ -4403,6 +4404,11 @@ (setq l-port (match-string 2 l-host) l-host (match-string 1 l-host))) + ;; Check, whether there is a restricted shell. + (dolist (elt tramp-restricted-shell-hosts-alist) + (when (string-match elt tramp-current-host) + (setq r-shell t))) + ;; Set variables for computing the prompt for ;; reading password. They can also be derived ;; from a gateway. @@ -4421,7 +4427,7 @@ (concat ;; We do not want to see the trailing local ;; prompt in `start-file-process'. - (unless (memq system-type '(windows-nt)) "exec ") + (unless r-shell "exec ") command " " (mapconcat (lambda (x) @@ -4430,9 +4436,10 @@ login-args " ") ;; Local shell could be a Windows COMSPEC. It ;; doesn't know the ";" syntax, but we must exit - ;; always for `start-file-process'. "exec" does - ;; not work either. - (if (memq system-type '(windows-nt)) " && exit || exit"))) + ;; always for `start-file-process'. It could + ;; also be a restricted shell, which does not + ;; allow "exec". + (when r-shell " && exit || exit"))) ;; Send the command. (tramp-message vec 3 "Sending command `%s'" command) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2012-07-05 06:57:57 +0000 +++ lisp/net/tramp.el 2012-07-06 13:16:13 +0000 @@ -405,6 +405,18 @@ :group 'tramp :type 'boolean) +(defcustom tramp-restricted-shell-hosts-alist + (when (memq system-type '(windows-nt)) + (list (concat "\\`" (regexp-quote (system-name)) "\\'"))) + "List of hosts, which run a restricted shell. +This is a list of regular expressions, which denote hosts running +a registered shell like \"rbash\". Those hosts can be used as +proxies only, see `tramp-default-proxies-alist'. If the local +host runs a registered shell, it shall be added to this list, too." + :version "24.2" + :group 'tramp + :type '(repeat (regexp :tag "Host regexp"))) + ;;;###tramp-autoload (defconst tramp-local-host-regexp (concat ------------------------------------------------------------ revno: 108908 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 06:17:34 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-07-04 10:17:38 +0000 +++ autogen/configure 2012-07-06 10:17:34 +0000 @@ -10070,8 +10070,8 @@ if test $gl_cv_sys_struct_timeval != yes; then HAVE_STRUCT_TIMEVAL=0 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct struct timeval.tv_sec member" >&5 -$as_echo_n "checking for correct struct timeval.tv_sec member... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 +$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -10089,7 +10089,9 @@ main () { static struct timeval x; - typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1]; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; ; return 0; ------------------------------------------------------------ revno: 108907 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2012-07-06 13:20:41 +0400 message: Compile marker debugging code only if ENABLE_CHECKING is defined. * marker.c (byte_char_debug_check, count_markers): Use only if ENABLE_CHECKING is defined. (byte_debug_flag): Remove. (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos): Always call byte_char_debug_check if ENABLE_CHECKING is defined. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 08:53:15 +0000 +++ src/ChangeLog 2012-07-06 09:20:41 +0000 @@ -1,5 +1,14 @@ 2012-07-06 Dmitry Antipov + Compile marker debugging code only if ENABLE_CHECKING is defined. + * marker.c (byte_char_debug_check, count_markers): Use + only if ENABLE_CHECKING is defined. + (byte_debug_flag): Remove. + (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos): + Always call byte_char_debug_check if ENABLE_CHECKING is defined. + +2012-07-06 Dmitry Antipov + Avoid code repetition in marker-related functions. * marker.c (attach_marker): New function. (Fset_marker, set_marker_restricted, set_marker_both) === modified file 'src/marker.c' --- src/marker.c 2012-07-06 08:53:15 +0000 +++ src/marker.c 2012-07-06 09:20:41 +0000 @@ -31,8 +31,36 @@ static struct buffer *cached_buffer; static int cached_modiff; -static void byte_char_debug_check (struct buffer *, ptrdiff_t, ptrdiff_t); - +#ifdef ENABLE_CHECKING + +extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE; + +static void +byte_char_debug_check (struct buffer *b, ptrdiff_t charpos, ptrdiff_t bytepos) +{ + ptrdiff_t nchars = 0; + + if (bytepos > BUF_GPT_BYTE (b)) + { + nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b), + BUF_GPT_BYTE (b) - BUF_BEG_BYTE (b)); + nchars += multibyte_chars_in_text (BUF_GAP_END_ADDR (b), + bytepos - BUF_GPT_BYTE (b)); + } + else + nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b), + bytepos - BUF_BEG_BYTE (b)); + + if (charpos - 1 != nchars) + abort (); +} + +#else /* not ENABLE_CHECKING */ + +#define byte_char_debug_check(b,charpos,bytepos) do { } while (0) + +#endif /* ENABLE_CHECKING */ + void clear_charpos_cache (struct buffer *b) { @@ -61,8 +89,8 @@ if (this_charpos == charpos) \ { \ ptrdiff_t value = (BYTEPOS); \ - if (byte_debug_flag) \ - byte_char_debug_check (b, charpos, value); \ + \ + byte_char_debug_check (b, charpos, value); \ return value; \ } \ else if (this_charpos > charpos) \ @@ -86,33 +114,13 @@ if (best_above - best_below == best_above_byte - best_below_byte) \ { \ ptrdiff_t value = best_below_byte + (charpos - best_below); \ - if (byte_debug_flag) \ - byte_char_debug_check (b, charpos, value); \ + \ + byte_char_debug_check (b, charpos, value); \ return value; \ } \ } \ } -static void -byte_char_debug_check (struct buffer *b, ptrdiff_t charpos, ptrdiff_t bytepos) -{ - ptrdiff_t nchars = 0; - - if (bytepos > BUF_GPT_BYTE (b)) - { - nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b), - BUF_GPT_BYTE (b) - BUF_BEG_BYTE (b)); - nchars += multibyte_chars_in_text (BUF_GAP_END_ADDR (b), - bytepos - BUF_GPT_BYTE (b)); - } - else - nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b), - bytepos - BUF_BEG_BYTE (b)); - - if (charpos - 1 != nchars) - abort (); -} - ptrdiff_t charpos_to_bytepos (ptrdiff_t charpos) { @@ -189,8 +197,7 @@ if (record) build_marker (b, best_below, best_below_byte); - if (byte_debug_flag) - byte_char_debug_check (b, charpos, best_below_byte); + byte_char_debug_check (b, charpos, best_below_byte); cached_buffer = b; cached_modiff = BUF_MODIFF (b); @@ -215,8 +222,7 @@ if (record) build_marker (b, best_above, best_above_byte); - if (byte_debug_flag) - byte_char_debug_check (b, charpos, best_above_byte); + byte_char_debug_check (b, charpos, best_above_byte); cached_buffer = b; cached_modiff = BUF_MODIFF (b); @@ -262,8 +268,8 @@ if (this_bytepos == bytepos) \ { \ ptrdiff_t value = (CHARPOS); \ - if (byte_debug_flag) \ - byte_char_debug_check (b, value, bytepos); \ + \ + byte_char_debug_check (b, value, bytepos); \ return value; \ } \ else if (this_bytepos > bytepos) \ @@ -287,8 +293,8 @@ if (best_above - best_below == best_above_byte - best_below_byte) \ { \ ptrdiff_t value = best_below + (bytepos - best_below_byte); \ - if (byte_debug_flag) \ - byte_char_debug_check (b, value, bytepos); \ + \ + byte_char_debug_check (b, value, bytepos); \ return value; \ } \ } \ @@ -357,8 +363,7 @@ if (record && BUF_MARKERS (b)) build_marker (b, best_below, best_below_byte); - if (byte_debug_flag) - byte_char_debug_check (b, best_below, bytepos); + byte_char_debug_check (b, best_below, bytepos); cached_buffer = b; cached_modiff = BUF_MODIFF (b); @@ -385,8 +390,7 @@ if (record && BUF_MARKERS (b)) build_marker (b, best_above, best_above_byte); - if (byte_debug_flag) - byte_char_debug_check (b, best_above, bytepos); + byte_char_debug_check (b, best_above, bytepos); cached_buffer = b; cached_modiff = BUF_MODIFF (b); @@ -775,9 +779,10 @@ return Qnil; } +#ifdef ENABLE_CHECKING + /* For debugging -- count the markers in buffer BUF. */ -extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE; int count_markers (struct buffer *buf) { @@ -789,6 +794,8 @@ return total; } + +#endif /* ENABLE_CHECKING */ void syms_of_marker (void) @@ -800,8 +807,4 @@ defsubr (&Smarker_insertion_type); defsubr (&Sset_marker_insertion_type); defsubr (&Sbuffer_has_markers_at); - - DEFVAR_BOOL ("byte-debug-flag", byte_debug_flag, - doc: /* Non-nil enables debugging checks in byte/char position conversions. */); - byte_debug_flag = 0; } ------------------------------------------------------------ revno: 108906 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2012-07-06 12:53:15 +0400 message: Avoid code repetition in marker-related functions. * marker.c (attach_marker): New function. (Fset_marker, set_marker_restricted, set_marker_both) (set_marker_restricted_both): Use it. (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at): Consistently rename charno to charpos. (marker_position): Add eassert. (marker_byte_position): Convert to eassert. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 07:34:37 +0000 +++ src/ChangeLog 2012-07-06 08:53:15 +0000 @@ -1,7 +1,19 @@ 2012-07-06 Dmitry Antipov + Avoid code repetition in marker-related functions. + * marker.c (attach_marker): New function. + (Fset_marker, set_marker_restricted, set_marker_both) + (set_marker_restricted_both): Use it. + (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at): + Consistently rename charno to charpos. + (marker_position): Add eassert. + (marker_byte_position): Convert to eassert. + +2012-07-06 Dmitry Antipov + + Simplify list operations in unchain_overlay and unchain_marker. * buffer.c (unchain_overlay): Simplify. Add comment. - * marker.c (unchain_marker): Simplify. Fix comments. + * marker.c (unchain_marker): Simplify. Fix comments. 2012-07-06 Dmitry Antipov === modified file 'src/marker.c' --- src/marker.c 2012-07-06 07:34:37 +0000 +++ src/marker.c 2012-07-06 08:53:15 +0000 @@ -432,7 +432,28 @@ return Qnil; } - + +/* Change M so it points to B at CHARPOS and BYTEPOS. */ + +static inline void +attach_marker (struct Lisp_Marker *m, struct buffer *b, + ptrdiff_t charpos, ptrdiff_t bytepos) +{ + /* Every character is at least one byte. */ + eassert (charpos <= bytepos); + + m->charpos = charpos; + m->bytepos = bytepos; + + if (m->buffer != b) + { + unchain_marker (m); + m->buffer = b; + m->next = BUF_MARKERS (b); + BUF_MARKERS (b) = m; + } +} + DEFUN ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, doc: /* Position MARKER before character number POSITION in BUFFER. BUFFER defaults to the current buffer. @@ -441,7 +462,7 @@ Returns MARKER. */) (Lisp_Object marker, Lisp_Object position, Lisp_Object buffer) { - register ptrdiff_t charno; + register ptrdiff_t charpos; register ptrdiff_t bytepos; register struct buffer *b; register struct Lisp_Marker *m; @@ -483,24 +504,10 @@ } CHECK_NUMBER_COERCE_MARKER (position); - charno = clip_to_bounds (BUF_BEG (b), XINT (position), BUF_Z (b)); - bytepos = buf_charpos_to_bytepos (b, charno); - - /* Every character is at least one byte. */ - if (charno > bytepos) - abort (); - - m->bytepos = bytepos; - m->charpos = charno; - - if (m->buffer != b) - { - unchain_marker (m); - m->buffer = b; - m->next = BUF_MARKERS (b); - BUF_MARKERS (b) = m; - } - + charpos = clip_to_bounds (BUF_BEG (b), XINT (position), BUF_Z (b)); + bytepos = buf_charpos_to_bytepos (b, charpos); + + attach_marker (m, b, charpos, bytepos); return marker; } @@ -510,7 +517,7 @@ Lisp_Object set_marker_restricted (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer) { - register ptrdiff_t charno; + register ptrdiff_t charpos; register ptrdiff_t bytepos; register struct buffer *b; register struct Lisp_Marker *m; @@ -552,24 +559,10 @@ } CHECK_NUMBER_COERCE_MARKER (pos); - charno = clip_to_bounds (BUF_BEGV (b), XINT (pos), BUF_ZV (b)); - bytepos = buf_charpos_to_bytepos (b, charno); - - /* Every character is at least one byte. */ - if (charno > bytepos) - abort (); - - m->bytepos = bytepos; - m->charpos = charno; - - if (m->buffer != b) - { - unchain_marker (m); - m->buffer = b; - m->next = BUF_MARKERS (b); - BUF_MARKERS (b) = m; - } - + charpos = clip_to_bounds (BUF_BEGV (b), XINT (pos), BUF_ZV (b)); + bytepos = buf_charpos_to_bytepos (b, charpos); + + attach_marker (m, b, charpos, bytepos); return marker; } @@ -603,21 +596,8 @@ if (BUF_Z (b) == BUF_Z_BYTE (b) && charpos != bytepos) abort (); - /* Every character is at least one byte. */ - if (charpos > bytepos) - abort (); - - m->bytepos = bytepos; - m->charpos = charpos; - - if (m->buffer != b) - { - unchain_marker (m); - m->buffer = b; - m->next = BUF_MARKERS (b); - BUF_MARKERS (b) = m; - } - + + attach_marker (m, b, charpos, bytepos); return marker; } @@ -654,21 +634,8 @@ if (BUF_Z (b) == BUF_Z_BYTE (b) && charpos != bytepos) abort (); - /* Every character is at least one byte. */ - if (charpos > bytepos) - abort (); - - m->bytepos = bytepos; - m->charpos = charpos; - - if (m->buffer != b) - { - unchain_marker (m); - m->buffer = b; - m->next = BUF_MARKERS (b); - BUF_MARKERS (b) = m; - } - + + attach_marker (m, b, charpos, bytepos); return marker; } @@ -726,6 +693,8 @@ if (!buf) error ("Marker does not point anywhere"); + eassert (BUF_BEG (buf) <= m->charpos && m->charpos <= BUF_Z (buf)); + return m->charpos; } @@ -736,15 +705,13 @@ { register struct Lisp_Marker *m = XMARKER (marker); register struct buffer *buf = m->buffer; - register ptrdiff_t i = m->bytepos; if (!buf) error ("Marker does not point anywhere"); - if (i < BUF_BEG_BYTE (buf) || i > BUF_Z_BYTE (buf)) - abort (); + eassert (BUF_BEG_BYTE (buf) <= m->bytepos && m->bytepos <= BUF_Z_BYTE (buf)); - return i; + return m->bytepos; } DEFUN ("copy-marker", Fcopy_marker, Scopy_marker, 0, 2, 0, @@ -797,12 +764,12 @@ (Lisp_Object position) { register struct Lisp_Marker *tail; - register ptrdiff_t charno; + register ptrdiff_t charpos; - charno = clip_to_bounds (BEG, XINT (position), Z); + charpos = clip_to_bounds (BEG, XINT (position), Z); for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) - if (tail->charpos == charno) + if (tail->charpos == charpos) return Qt; return Qnil; ------------------------------------------------------------ revno: 108905 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 00:48:10 -0700 message: * intro.texi (A Sample Variable Description): The saga continues... http://debbugs.gnu.org/11862#89 diff: === modified file 'doc/lispref/intro.texi' --- doc/lispref/intro.texi 2012-07-06 04:25:04 +0000 +++ doc/lispref/intro.texi 2012-07-06 07:48:10 +0000 @@ -448,7 +448,7 @@ A @dfn{variable} is a name that can be @dfn{bound} (or @dfn{set}) to an object. The object to which a variable is bound is called a -@dfn{value}; we say also that variable @dfn{holds} that value. +@dfn{value}; we say also that variable holds that value. Although nearly all variables can be set by the user, certain variables exist specifically so that users can change them; these are called @dfn{user options}. Ordinary variables and user options are ------------------------------------------------------------ revno: 108904 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 00:45:23 -0700 message: Comment tweak diff: === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2012-07-06 07:29:43 +0000 +++ lisp/Makefile.in 2012-07-06 07:45:23 +0000 @@ -326,7 +326,7 @@ # starting Emacs many times (it was 33% faster on a test with a # random 10% of the .el files needing recompilation). # Unlike compile, this is not parallelizable; so if you have more than -# one core, compile will be (much) faster. +# one core and use make -j#, compile will be (much) faster. # This rule also produces less accurate compilation warnings. # The environment of later files is affected by definitions in # earlier ones, so it does not produce some warnings that it should. ------------------------------------------------------------ revno: 108903 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 00:40:43 -0700 message: Tweaks for make-dist --update. * make-dist [update]: Let autoreconf figure out what needs updating. Use `make info-real'. leim/leim-list.el should always exist. Check cd return value. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-06 03:08:57 +0000 +++ ChangeLog 2012-07-06 07:40:43 +0000 @@ -1,3 +1,9 @@ +2012-07-06 Glenn Morris + + * make-dist [update]: Let autoreconf figure out what needs updating. + Use `make info-real'. leim/leim-list.el should always exist. + Check cd return value. + 2012-07-06 Paul Eggert Merge from gnulib. This is for OpenBSD 5.1 amd64. === modified file 'make-dist' --- make-dist 2012-06-06 01:06:54 +0000 +++ make-dist 2012-07-06 07:40:43 +0000 @@ -230,35 +230,24 @@ if [ $update = yes ]; then - ## Make sure configure is newer than configure.in. - if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then - echo "\`./configure.in' is newer than \`./configure'" >&2 - echo "Running autoconf" >&2 - autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } - fi + ## Make sure configure is newer than configure.in, etc. + ## It is better to let autoreconf do what is needed than + ## for us to try and duplicate all its checks. + echo "Running autoreconf" + autoreconf -i -I m4 || { x=$?; echo Autoreconf FAILED! >&2; exit $x; } ## Make sure src/stamp-h.in is newer than configure.in. - if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then - echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 - echo "Running autoheader" >&2 - autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; } - rm -f src/stamp-h.in - echo timestamp > src/stamp-h.in - fi + rm -f src/stamp-h.in + echo timestamp > src/stamp-h.in echo "Updating Info files" - (cd doc/emacs; make info) - (cd doc/misc; make info) - (cd doc/lispref; make info) - (cd doc/lispintro; make info) + make info-real echo "Updating finder, custom and autoload data" - (cd lisp; make updates EMACS="$EMACS") + (cd lisp && make updates EMACS="$EMACS") - if test -f leim/leim-list.el; then - echo "Updating leim-list.el" - (cd leim; make leim-list.el EMACS="$EMACS") - fi + echo "Updating leim-list.el" + (cd leim && make leim-list.el EMACS="$EMACS") echo "Recompiling Lisp files" $EMACS -batch -f batch-byte-recompile-directory lisp leim ------------------------------------------------------------ revno: 108902 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2012-07-06 11:34:37 +0400 message: * buffer.c (unchain_overlay): Simplify. Add comment. * marker.c (unchain_marker): Simplify. Fix comments. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-06 05:07:44 +0000 +++ src/ChangeLog 2012-07-06 07:34:37 +0000 @@ -1,5 +1,10 @@ 2012-07-06 Dmitry Antipov + * buffer.c (unchain_overlay): Simplify. Add comment. + * marker.c (unchain_marker): Simplify. Fix comments. + +2012-07-06 Dmitry Antipov + Introduce fast path for the widely used marker operation. * alloc.c (build_marker): New function. * lisp.h (build_marker): New prototype. === modified file 'src/buffer.c' --- src/buffer.c 2012-07-06 05:07:44 +0000 +++ src/buffer.c 2012-07-06 07:34:37 +0000 @@ -3672,18 +3672,17 @@ ++BUF_OVERLAY_MODIFF (buf); } - +/* Remove OVERLAY from LIST. */ + static struct Lisp_Overlay * unchain_overlay (struct Lisp_Overlay *list, struct Lisp_Overlay *overlay) { - struct Lisp_Overlay *tmp, *prev; - for (tmp = list, prev = NULL; tmp; prev = tmp, tmp = tmp->next) - if (tmp == overlay) + register struct Lisp_Overlay *tail, **prev = &list; + + for (tail = list; tail; prev = &tail->next, tail = *prev) + if (tail == overlay) { - if (prev) - prev->next = tmp->next; - else - list = tmp->next; + *prev = overlay->next; overlay->next = NULL; break; } === modified file 'src/marker.c' --- src/marker.c 2012-07-06 05:07:44 +0000 +++ src/marker.c 2012-07-06 07:34:37 +0000 @@ -672,59 +672,47 @@ return marker; } -/* Remove MARKER from the chain of whatever buffer it is in. - Leave it "in no buffer". - - This is called during garbage collection, - so we must be careful to ignore and preserve mark bits, - including those in chain fields of markers. */ +/* Remove MARKER from the chain of whatever buffer it is in, + leaving it points to nowhere. This is called during garbage + collection, so we must be careful to ignore and preserve + mark bits, including those in chain fields of markers. */ void unchain_marker (register struct Lisp_Marker *marker) { - register struct Lisp_Marker *tail, *prev, *next; - register struct buffer *b; - - b = marker->buffer; - if (b == 0) - return; - - if (EQ (BVAR (b, name), Qnil)) - abort (); - - marker->buffer = 0; - - tail = BUF_MARKERS (b); - prev = NULL; - while (tail) + register struct buffer *b = marker->buffer; + + if (b) { - next = tail->next; - - if (marker == tail) - { - if (!prev) - { - BUF_MARKERS (b) = next; - /* Deleting first marker from the buffer's chain. Crash - if new first marker in chain does not say it belongs - to the same buffer, or at least that they have the same - base buffer. */ - if (next && b->text != next->buffer->text) - abort (); - } - else - prev->next = next; - /* We have removed the marker from the chain; - no need to scan the rest of the chain. */ - return; - } - else - prev = tail; - tail = next; + register struct Lisp_Marker *tail, **prev; + + /* No dead buffers here. */ + eassert (!NILP (BVAR (b, name))); + + marker->buffer = NULL; + prev = &BUF_MARKERS (b); + + for (tail = BUF_MARKERS (b); tail; prev = &tail->next, tail = *prev) + if (marker == tail) + { + if (*prev == BUF_MARKERS (b)) + { + /* Deleting first marker from the buffer's chain. Crash + if new first marker in chain does not say it belongs + to the same buffer, or at least that they have the same + base buffer. */ + if (tail->next && b->text != tail->next->buffer->text) + abort (); + } + *prev = tail->next; + /* We have removed the marker from the chain; + no need to scan the rest of the chain. */ + break; + } + + /* Error if marker was not in it's chain. */ + eassert (tail != NULL); } - - /* Marker was not in its chain. */ - abort (); } /* Return the char position of marker MARKER, as a C integer. */ ------------------------------------------------------------ revno: 108901 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 00:29:43 -0700 message: * lisp/Makefile.in: Comment diff: === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2012-07-06 07:23:25 +0000 +++ lisp/Makefile.in 2012-07-06 07:29:43 +0000 @@ -189,6 +189,10 @@ # This is useful after "bzr up"; but it doesn't do anything that a # plain "make" at top-level doesn't. +# The only difference between this and this directory's "all" rule +# is that this runs "autoloads" as well (because it uses "compile" +# rather than "compile-main"). In a bootstrap, $(lisp) in src/Makefile +# triggers this directory's autoloads rule. bzr-update: compile finder-data custom-deps # Update the AUTHORS file. ------------------------------------------------------------ revno: 108900 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 00:23:25 -0700 message: Move a comment from lisp/Makefile.in to lisp/loadup.el. The comment in Makefile.in has been orphaned ever since the bootstrap-prepare rule was removed in 2008. diff: === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2012-07-06 07:08:10 +0000 +++ lisp/Makefile.in 2012-07-06 07:23:25 +0000 @@ -414,19 +414,6 @@ --eval "(setq make-backup-files nil)" \ -f batch-update-autoloads $(CAL_DIR) -# Prepare a bootstrap in the lisp subdirectory. -# -# Build loaddefs.el to make sure it's up-to-date. If it's not, that -# might lead to errors during the bootstrap because something fails to -# autoload as expected. If there is no emacs binary, then we can't -# build autoloads yet. In that case we have to use ldefs-boot.el. -# Bootstrap should always work with ldefs-boot.el. Therefore, -# whenever a new autoload cookie gets added that is necessary during -# bootstrapping, ldefs-boot.el should be updated by overwriting it with -# an up-to-date copy of loaddefs.el that is uncorrupted by -# local changes. (Because loaddefs.el is an automatically generated -# file, we don't want to store it in the source repository). - bootstrap-clean: cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc $(AUTOGENEL) === modified file 'lisp/loadup.el' --- lisp/loadup.el 2012-07-02 08:00:05 +0000 +++ lisp/loadup.el 2012-07-06 07:23:25 +0000 @@ -108,6 +108,17 @@ (load "button") (load "startup") +;; We don't want to store loaddefs.el in the repository because it is +;; a generated file; but it is required in order to compile the lisp files. +;; When bootstrapping, we cannot generate loaddefs.el until an +;; emacs binary has been built. We therefore compromise and keep +;; ldefs-boot.el in the repository. This does not need to be updated +;; as often as the real loaddefs.el would. Bootstrap should always +;; work with ldefs-boot.el. Therefore, Whenever a new autoload cookie +;; gets added that is necessary during bootstrapping, ldefs-boot.el +;; should be updated by overwriting it with an up-to-date copy of +;; loaddefs.el that is uncorrupted by local changes. +;; autogen/update_autogen can be used to periodically update ldefs-boot. (condition-case nil ;; Don't get confused if someone compiled this by mistake. (load "loaddefs.el") ------------------------------------------------------------ revno: 108899 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 00:08:10 -0700 message: * lisp/Makefile.in (compile-one-process): Rename from "recompile". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-06 07:06:13 +0000 +++ lisp/ChangeLog 2012-07-06 07:08:10 +0000 @@ -1,5 +1,7 @@ 2012-07-06 Glenn Morris + * Makefile.in (compile-one-process): Rename from "recompile". + * Makefile.in (bzr-update): "compile" is the same as "recompile autoloads", but parallelizable, so use that instead. === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2012-07-06 07:06:13 +0000 +++ lisp/Makefile.in 2012-07-06 07:08:10 +0000 @@ -133,8 +133,6 @@ esac; \ done -# `compile-main' tends to be slower than `recompile' but can be parallelized -# with "make -j" and results in more deterministic compilation warnings. # cus-load and finder-inf are not explicitly requested by anything, so # we add them here to make sure they get built. all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el @@ -317,19 +315,22 @@ compile-after-backup: backup-compiled-files compile-always -# Recompile all Lisp files which are newer than their .elc files and compile -# new ones. -# This has the same effect as compile-main. recompile has some advantages: -# i) It is faster (on a single processor), since it only has to start -# Emacs once. It was 33% faster on a test with a random 10% of the .el -# files needing recompilation. -# ii) The explicit cc-mode dependency. -# recompile's disadvantages are: -# i) Not parallelizable. -# ii) Compiling multiple files in the same instance of Emacs is wrong, -# since the environment of later files is affected by definitions in -# earlier ones. -recompile: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc +# This does the same job as the "compile" rule, but in a different way. +# Rather than spawning a separate Emacs instance to compile each file, +# it uses the same Emacs instance to compile everything. +# This is faster on a single core, since it avoids the overhead of +# starting Emacs many times (it was 33% faster on a test with a +# random 10% of the .el files needing recompilation). +# Unlike compile, this is not parallelizable; so if you have more than +# one core, compile will be (much) faster. +# This rule also produces less accurate compilation warnings. +# The environment of later files is affected by definitions in +# earlier ones, so it does not produce some warnings that it should. +# It can also produces spurious warnings about "invalid byte code" if +# files that use byte-compile-dynamic are updated. +# There is no reason to use this rule unless you only have a single +# core and CPU time is an issue. +compile-one-process: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc $(emacs) $(BYTE_COMPILE_FLAGS) \ --eval "(batch-byte-recompile-directory 0)" $(lisp) ------------------------------------------------------------ revno: 108898 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-07-06 00:06:13 -0700 message: * lisp/Makefile.in (bzr-update): Use "compile". It is the same as "recompile autoloads", but parallelizable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-06 06:22:56 +0000 +++ lisp/ChangeLog 2012-07-06 07:06:13 +0000 @@ -1,3 +1,8 @@ +2012-07-06 Glenn Morris + + * Makefile.in (bzr-update): "compile" is the same as "recompile + autoloads", but parallelizable, so use that instead. + 2012-07-06 Dmitry Gutov * window.el (quit-window): Always restore window height when === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2012-07-06 01:31:54 +0000 +++ lisp/Makefile.in 2012-07-06 07:06:13 +0000 @@ -191,7 +191,7 @@ # This is useful after "bzr up"; but it doesn't do anything that a # plain "make" at top-level doesn't. -bzr-update: recompile autoloads finder-data custom-deps +bzr-update: compile finder-data custom-deps # Update the AUTHORS file. ------------------------------------------------------------ revno: 108897 author: Dmitry Gutov committer: martin rudalics branch nick: trunk timestamp: Fri 2012-07-06 08:22:56 +0200 message: In quit-window always restore window height when it's saved in quit-restore parameter. * window.el (quit-window): Always restore window height when it's saved in quit-restore parameter. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-06 04:31:46 +0000 +++ lisp/ChangeLog 2012-07-06 06:22:56 +0000 @@ -1,3 +1,8 @@ +2012-07-06 Dmitry Gutov + + * window.el (quit-window): Always restore window height when + it's saved in quit-restore parameter. + 2012-07-06 Glenn Morris * simple.el (kill-whole-line): Doc tweak. === modified file 'lisp/window.el' --- lisp/window.el 2012-06-22 21:24:54 +0000 +++ lisp/window.el 2012-07-06 06:22:56 +0000 @@ -3069,9 +3069,8 @@ (buffer-live-p (car quad)) (eq (nth 3 quit-restore) buffer)) ;; Show another buffer stored in quit-restore parameter. - (setq resize (with-current-buffer buffer - (and temp-buffer-resize-mode - (/= (nth 3 quad) (window-total-size window))))) + (setq resize (and (integerp (nth 3 quad)) + (/= (nth 3 quad) (window-total-size window)))) (set-window-dedicated-p window nil) (when resize ;; Try to resize WINDOW to its old height but don't signal an