Commit 9441f0e4 authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from mainline.

parents ba01e9d7 e84efb70
......@@ -2,6 +2,17 @@
* lib/min-max.h: New file, for "min" and "max".
2011-02-21 Christoph Scholtes <cschol2112@gmail.com>
* lib/makefile.w32-in: ($(BLD)/md5.$(O)): Added dependency on
$(EMACS_ROOT)/nt/inc/stdint.h.
2011-02-21 Eli Zaretskii <eliz@gnu.org>
* lib/makefile.w32-in ($(BLD)/filemode.$(O)): Move from
src/makefile.w32-in and adapt. Depend on stamp_BLD.
(GNULIBOBJS): Add $(BLD)/filemode.$(O).
2011-02-20 Paul Eggert <eggert@cs.ucla.edu>
Import filemode module from gnulib.
......
......@@ -25,6 +25,12 @@
Declare non-'main' functions and variables to be static.
* ebrowse.c: Omit redundant function prototypes.
2011-02-21 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(BLD)/ctags.$(O), $(BLD)/emacsclient.$(O))
($(BLD)/etags.$(O), $(BLD)/movemail.$(O), $(BLD)/ntlib.$(O)):
Depend on $(EMACS_ROOT)/nt/inc/sys/stat.h.
2011-02-21 Ben Key <bkey76@gmail.com> (tiny change)
* make-docfile.c (scan_c_file): Adapt DEFVAR_PER_BUFFER case to
......
......@@ -374,6 +374,7 @@ $(BLD)/alloca.$(O) : \
$(BLD)/ctags.$(O) : \
$(SRC)/ctags.c \
$(EMACS_ROOT)/nt/inc/sys/param.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h \
......@@ -382,6 +383,7 @@ $(BLD)/ctags.$(O) : \
$(BLD)/emacsclient.$(O) : \
$(SRC)/emacsclient.c \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h
......@@ -389,6 +391,7 @@ $(BLD)/emacsclient.$(O) : \
$(BLD)/etags.$(O) : \
$(SRC)/etags.c \
$(EMACS_ROOT)/nt/inc/sys/param.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h \
......@@ -429,6 +432,7 @@ $(BLD)/movemail.$(O) : \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h \
$(EMACS_ROOT)/nt/inc/sys/file.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/lib-src/../src/syswait.h \
$(EMACS_ROOT)/nt/inc/pwd.h \
$(SRC)/ntlib.h
......@@ -437,6 +441,7 @@ $(BLD)/movemail.$(O) : \
$(BLD)/ntlib.$(O) : \
$(SRC)/ntlib.c \
$(SRC)/ntlib.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/nt/inc/pwd.h
$(BLD)/pop.$(O) : \
......
......@@ -28,7 +28,8 @@ GNULIBOBJS = $(BLD)/dtoastr.$(O) \
$(BLD)/getopt1.$(O) \
$(BLD)/strftime.$(O) \
$(BLD)/time_r.$(O) \
$(BLD)/md5.$(O)
$(BLD)/md5.$(O) \
$(BLD)/filemode.$(O)
#
# Build the library
......@@ -95,17 +96,27 @@ $(BLD)/time_r.$(O) : \
$(EMACS_ROOT)/src/config.h
$(BLD)/md5.$(O) : \
$(EMACS_ROOT)/lib/md5.c \
$(SRC)/md5.c \
$(SRC)/md5.h \
$(EMACS_ROOT)/nt/inc/stdint.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h \
$(EMACS_ROOT)/lib/md5.h
$(EMACS_ROOT)/src/config.h
$(BLD)/filemode.$(O) : \
$(SRC)/filemode.c \
$(SRC)/filemode.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
# The following dependencies are for supporting parallel builds, where
# we must make sure $(BLD) exists before any compilation starts.
#
$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD
$(BLD)/strftime.$(O) $(BLD)/time_r.$(O) $(BLD)/md5.$(O): stamp_BLD
$(BLD)/filemode.$(O): stamp_BLD
#
# Headers we would preprocess if we could.
......
2011-02-21 Alan Mackenzie <acm@muc.de>
Fix bug #7930.
* progmodes/cc-engine.el (c-state-literal-at): Prevent positions
in macros finding their way into c-state-nonlit-pos-cache.
Strengthen the comments.
(c-state-dump): New commented out diagnostic routine.
2011-02-21 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-rfn-eshadow-setup-minibuffer): Do not use
`field' property of `rfn-eshadow-overlay'.
2011-02-21 Lars Ingebrigtsen <larsi@gnus.org>
* net/netrc.el (netrc-parse): Comment fix.
......@@ -264,7 +277,7 @@
2011-02-16 Alex Harsanyi <AlexHarsanyi@gmail.com>
* soap-client.el (soap-well-known-xmlns, soap-local-xmlns)
* net/soap-client.el (soap-well-known-xmlns, soap-local-xmlns)
(soap-default-xmlns, soap-target-xmlns, soap-multi-refs)
(soap-decoded-multi-refs, soap-current-wsdl)
(soap-encoded-namespaces): Rename CL-style *...* variables.
......
......@@ -1574,8 +1574,12 @@ special handling of `substitute-in-file-name'."
(let ((props (tramp-compat-funcall
'overlay-properties (symbol-value 'rfn-eshadow-overlay))))
(while props
(tramp-compat-funcall
'overlay-put tramp-rfn-eshadow-overlay (pop props) (pop props))))))
;; The `field' property prevents correct minibuffer
;; completion; we exclude it.
(if (not (eq (car props) 'field))
(tramp-compat-funcall
'overlay-put tramp-rfn-eshadow-overlay (pop props) (pop props))
(pop props) (pop props))))))
(when (boundp 'rfn-eshadow-setup-minibuffer-hook)
(add-hook 'rfn-eshadow-setup-minibuffer-hook
......
......@@ -2023,9 +2023,9 @@ comment at the start of cc-engine.el for more info."
(defvar c-state-nonlit-pos-cache nil)
(make-variable-buffer-local 'c-state-nonlit-pos-cache)
;; A list of buffer positions which are known not to be in a literal. This is
;; ordered with higher positions at the front of the list. Only those which
;; are less than `c-state-nonlit-pos-cache-limit' are valid.
;; A list of buffer positions which are known not to be in a literal or a cpp
;; construct. This is ordered with higher positions at the front of the list.
;; Only those which are less than `c-state-nonlit-pos-cache-limit' are valid.
(defvar c-state-nonlit-pos-cache-limit 1)
(make-variable-buffer-local 'c-state-nonlit-pos-cache-limit)
......@@ -2056,6 +2056,12 @@ comment at the start of cc-engine.el for more info."
;; This function is almost the same as `c-literal-limits'. It differs in
;; that it is a lower level function, and that it rigourously follows the
;; syntax from BOB, whereas `c-literal-limits' uses a "local" safe position.
;;
;; NOTE: This function manipulates `c-state-nonlit-pos-cache'. This cache
;; MAY NOT contain any positions within macros, since macros are frequently
;; turned into comments by use of the `c-cpp-delimiter' category properties.
;; We cannot rely on this mechanism whilst determining a cache pos since
;; this function is also called from outwith `c-parse-state'.
(save-restriction
(widen)
(save-excursion
......@@ -2074,6 +2080,11 @@ comment at the start of cc-engine.el for more info."
here)
(setq lit (c-state-pp-to-literal pos npos))
(setq pos (or (cdr lit) npos)) ; end of literal containing npos.
(goto-char pos)
(when (and (c-beginning-of-macro) (/= (point) pos))
(c-syntactic-end-of-macro)
(or (eobp) (forward-char))
(setq pos (point)))
(setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache)))
(if (> pos c-state-nonlit-pos-cache-limit)
......@@ -2158,7 +2169,7 @@ comment at the start of cc-engine.el for more info."
;; of fruitless backward scans.
(defvar c-state-brace-pair-desert nil)
(make-variable-buffer-local 'c-state-brace-pair-desert)
;; Used only in `c-append-lower-brace-pair-to-state-cache'. It is set when an
;; Used only in `c-append-lower-brace-pair-to-state-cache'. It is set when
;; that defun has searched backwards for a brace pair and not found one. Its
;; value is either nil or a cons (PA . FROM), where PA is the position of the
;; enclosing opening paren/brace/bracket which bounds the backwards search (or
......@@ -2843,6 +2854,29 @@ comment at the start of cc-engine.el for more info."
c-state-old-cpp-end nil)
(c-state-mark-point-min-literal))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Debugging routines to dump `c-state-cache' in a "replayable" form.
;; (defmacro c-sc-de (elt) ; "c-state-cache-dump-element"
;; `(format ,(concat "(setq " (symbol-name elt) " %s) ") ,elt))
;; (defmacro c-sc-qde (elt) ; "c-state-cache-quote-dump-element"
;; `(format ,(concat "(setq " (symbol-name elt) " '%s) ") ,elt))
;; (defun c-state-dump ()
;; ;; For debugging.
;; ;(message
;; (concat
;; (c-sc-qde c-state-cache)
;; (c-sc-de c-state-cache-good-pos)
;; (c-sc-qde c-state-nonlit-pos-cache)
;; (c-sc-de c-state-nonlit-pos-cache-limit)
;; (c-sc-qde c-state-brace-pair-desert)
;; (c-sc-de c-state-point-min)
;; (c-sc-de c-state-point-min-lit-type)
;; (c-sc-de c-state-point-min-lit-start)
;; (c-sc-de c-state-min-scan-pos)
;; (c-sc-de c-state-old-cpp-beg)
;; (c-sc-de c-state-old-cpp-end)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c-invalidate-state-cache-1 (here)
;; Invalidate all info on `c-state-cache' that applies to the buffer at HERE
;; or higher and set `c-state-cache-good-pos' accordingly. The cache is
......
2011-02-21 Christoph Scholtes <cschol2112@gmail.com>
* inc/stdint.h: New file, to support compilation with tool chains
that do not have stdint.h (e.g. MSVC).
2011-02-21 Eli Zaretskii <eliz@gnu.org>
* inc/sys/stat.h (S_ISUID, S_ISGID, S_ISVTX, S_IRGRP, S_IROTH)
(S_IWGRP, S_IWOTH, S_IXGRP, S_IXOTH, S_ISSOCK, S_ISLNK, S_ISCTG)
(S_ISDOOR, S_ISMPB, S_ISMPC, S_ISNWK, S_ISPORT, S_ISWHT)
(S_TYPEISMQ, S_TYPEISSEM, S_TYPEISSHM, S_TYPEISTMO): Define.
(lstat): Define to stat.
2011-02-09 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Make the
......
/* Replacement stdint.h file for building GNU Emacs on Windows.
Copyright (C) 2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs 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.
GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _NT_STDINT_H_
#define _NT_STDINT_H_
#ifdef __GNUC__
# include_next <stdint.h> /* use stdint.h if available */
#else /* !__GNUC__ */
/* Minimum definitions to allow compilation with tool chains where
stdint.h is not available, e.g. Microsoft Visual Studio. */
typedef unsigned int uint32_t;
#endif /* !__GNUC__ */
#endif /* _NT_STDINT_H_ */
......@@ -56,6 +56,31 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
/* These don't exist on Windows, but lib/filemode.c wants them. */
#define S_ISUID 0
#define S_ISGID 0
#define S_ISVTX 0
#define S_IRGRP (S_IRUSR >> 3)
#define S_IROTH (S_IRUSR >> 6)
#define S_IWGRP (S_IWUSR >> 3)
#define S_IWOTH (S_IWUSR >> 6)
#define S_IXGRP (S_IXUSR >> 3)
#define S_IXOTH (S_IXUSR >> 6)
#define S_ISSOCK(m) 0
#define S_ISLNK(m) 0
#define S_ISCTG(p) 0
#define S_ISDOOR(m) 0
#define S_ISMPB(m) 0
#define S_ISMPC(m) 0
#define S_ISNWK(m) 0
#define S_ISPORT(m) 0
#define S_ISWHT(m) 0
#define S_TYPEISMQ(p) 0
#define S_TYPEISSEM(p) 0
#define S_TYPEISSHM(p) 0
#define S_TYPEISTMO(p) 0
struct stat {
unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */
dev_t st_dev;
......@@ -76,5 +101,8 @@ _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
/* fileio.c and dired.c want lstat. */
#define lstat stat
#endif /* INC_SYS_STAT_H_ */
2011-02-21 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(BLD)/filemode.$(O)): Move recipe to
lib/makefilw.w32-in.
($(BLD)/dired.$(O)): Depend on $(EMACS_ROOT)/lib/filemode.h.
(GLOBAL_SOURCES): Remove filemode.c.
(OBJ1): Remove $(BLD)/filemode.$(O).
2011-02-21 Paul Eggert <eggert@cs.ucla.edu>
Import filemode module from gnulib.
......@@ -72,7 +72,6 @@ OBJ1 = $(BLD)/alloc.$(O) \
$(BLD)/eval.$(O) \
$(BLD)/fileio.$(O) \
$(BLD)/filelock.$(O) \
$(BLD)/filemode.$(O) \
$(BLD)/fns.$(O) \
$(BLD)/indent.$(O) \
$(BLD)/insdel.$(O) \
......@@ -213,7 +212,7 @@ GLOBAL_SOURCES = dosfns.c msdos.c \
cm.c term.c terminal.c xfaces.c \
emacs.c keyboard.c macros.c keymap.c sysdep.c \
buffer.c filelock.c insdel.c marker.c \
minibuf.c fileio.c dired.c filemode.c \
minibuf.c fileio.c dired.c \
cmds.c casetab.c casefiddle.c indent.c search.c regex.c undo.c \
alloc.c data.c doc.c editfns.c callint.c \
eval.c floatfns.c fns.c print.c lread.c \
......@@ -663,6 +662,7 @@ $(BLD)/dired.$(O) : \
$(SRC)/coding.h \
$(SRC)/commands.h \
$(SRC)/composite.h \
$(EMACS_ROOT)/lib/filemode.h \
$(SRC)/ndir.h \
$(SRC)/regex.h \
$(SRC)/systime.h
......@@ -821,10 +821,6 @@ $(BLD)/filelock.$(O) : \
$(SRC)/composite.h \
$(SRC)/systime.h
$(BLD)/filemode.$(O) : \
$(SRC)/filemode.c \
$(CONFIG_H)
$(BLD)/firstfile.$(O) : \
$(SRC)/firstfile.c \
$(CONFIG_H)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment