diff options
| author | Eli Zaretskii | 2013-11-18 18:45:48 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-11-18 18:45:48 +0200 |
| commit | 18b35e2c7a3ff95fb4a07e58c3f57c70c65c0701 (patch) | |
| tree | 7a837a755a7c22d3258408cb384d01479ad88232 /lib-src | |
| parent | df87c56cdf6c8c13e8760bdc409e2eb0fda55b0b (diff) | |
| parent | 37c790b38599cc80a16c6a76152abbf8160fe2a1 (diff) | |
| download | emacs-18b35e2c7a3ff95fb4a07e58c3f57c70c65c0701.tar.gz emacs-18b35e2c7a3ff95fb4a07e58c3f57c70c65c0701.zip | |
Merge from mainline.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 18 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 49 | ||||
| -rw-r--r-- | lib-src/ebrowse.c | 2 | ||||
| -rw-r--r-- | lib-src/etags.c | 8 |
4 files changed, 47 insertions, 30 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 0b91cc4887f..2010444743a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2013-11-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * ebrowse.c (xstrdup): | ||
| 4 | * etags.c (savenstr): Prefer tail calls. | ||
| 5 | * etags.c (concat): Omit unnecessary assignment. | ||
| 6 | |||
| 7 | 2013-10-24 Glenn Morris <rgm@gnu.org> | ||
| 8 | |||
| 9 | * Makefile.in ($(DESTDIR)${archlibdir}): | ||
| 10 | Avoid non-portable "`\" nesting. | ||
| 11 | |||
| 12 | * Makefile.in (abs_top_srcdir): New, set by configure. | ||
| 13 | |||
| 14 | 2013-10-23 Glenn Morris <rgm@gnu.org> | ||
| 15 | |||
| 16 | * Makefile.in ($(DESTDIR)${archlibdir}, need-blessmail, install) | ||
| 17 | (uninstall): Quote entities that might contain whitespace. | ||
| 18 | |||
| 1 | 2013-10-10 Glenn Morris <rgm@gnu.org> | 19 | 2013-10-10 Glenn Morris <rgm@gnu.org> |
| 2 | 20 | ||
| 3 | * make-docfile.c (search_lisp_doc_at_eol): | 21 | * make-docfile.c (search_lisp_doc_at_eol): |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 994eb2bb266..b765668aebc 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -84,6 +84,8 @@ VPATH=@srcdir@ | |||
| 84 | 84 | ||
| 85 | # The top-level source directory, also set by configure. | 85 | # The top-level source directory, also set by configure. |
| 86 | top_srcdir=@top_srcdir@ | 86 | top_srcdir=@top_srcdir@ |
| 87 | # MinGW CPPFLAGS may use this. | ||
| 88 | abs_top_srcdir=@abs_top_srcdir@ | ||
| 87 | 89 | ||
| 88 | # ==================== Emacs-specific directories ==================== | 90 | # ==================== Emacs-specific directories ==================== |
| 89 | 91 | ||
| @@ -214,10 +216,10 @@ blessmail: | |||
| 214 | need-blessmail: blessmail | 216 | need-blessmail: blessmail |
| 215 | @if [ `wc -l <blessmail` != 2 ] ; then \ | 217 | @if [ `wc -l <blessmail` != 2 ] ; then \ |
| 216 | dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ | 218 | dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ |
| 217 | echo Assuming $$dir is really the mail spool directory, you should; \ | 219 | echo "Assuming $$dir is really the mail spool directory, you should"; \ |
| 218 | echo run lib-src/blessmail $(DESTDIR)${archlibdir}/movemail${EXEEXT}; \ | 220 | echo "run lib-src/blessmail $(DESTDIR)${archlibdir}/movemail${EXEEXT}"; \ |
| 219 | echo as root, to give movemail${EXEEXT} appropriate permissions.; \ | 221 | echo "as root, to give movemail${EXEEXT} appropriate permissions."; \ |
| 220 | echo Do that after running make install.; \ | 222 | echo "Do that after running make install."; \ |
| 221 | fi | 223 | fi |
| 222 | 224 | ||
| 223 | ## This is the target invoked by the top-level Makefile. | 225 | ## This is the target invoked by the top-level Makefile. |
| @@ -231,23 +233,24 @@ maybe-blessmail: $(BLESSMAIL_TARGET) | |||
| 231 | $(DESTDIR)${archlibdir}: all | 233 | $(DESTDIR)${archlibdir}: all |
| 232 | @echo | 234 | @echo |
| 233 | @echo "Installing utilities run internally by Emacs." | 235 | @echo "Installing utilities run internally by Emacs." |
| 234 | umask 022; ${MKDIR_P} $(DESTDIR)${archlibdir} | 236 | umask 022; ${MKDIR_P} "$(DESTDIR)${archlibdir}" |
| 235 | if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` != `/bin/pwd` ]; then \ | 237 | exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \ |
| 238 | if [ "$$exp_archlibdir" != "`/bin/pwd`" ]; then \ | ||
| 236 | for file in ${UTILITIES}; do \ | 239 | for file in ${UTILITIES}; do \ |
| 237 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \ | 240 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file "$(DESTDIR)${archlibdir}/$$file" ; \ |
| 238 | done ; \ | 241 | done ; \ |
| 239 | fi | 242 | fi |
| 240 | umask 022; ${MKDIR_P} $(DESTDIR)${gamedir}; \ | 243 | umask 022; ${MKDIR_P} "$(DESTDIR)${gamedir}"; \ |
| 241 | touch $(DESTDIR)${gamedir}/snake-scores; \ | 244 | touch "$(DESTDIR)${gamedir}/snake-scores"; \ |
| 242 | touch $(DESTDIR)${gamedir}/tetris-scores | 245 | touch "$(DESTDIR)${gamedir}/tetris-scores" |
| 243 | -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score${EXEEXT} && chmod u+s $(DESTDIR)${archlibdir}/update-game-score${EXEEXT}; then \ | 246 | -if chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && chmod u+s "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; then \ |
| 244 | chown ${gameuser} $(DESTDIR)${gamedir}; \ | 247 | chown ${gameuser} "$(DESTDIR)${gamedir}"; \ |
| 245 | chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \ | 248 | chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"; \ |
| 246 | fi | 249 | fi |
| 247 | if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` \ | 250 | if [ "`cd \"$(DESTDIR)${archlibdir}\" && /bin/pwd`" \ |
| 248 | != `cd ${srcdir} && /bin/pwd` ]; then \ | 251 | != "`cd ${srcdir} && /bin/pwd`" ]; then \ |
| 249 | for file in ${SCRIPTS}; do \ | 252 | for file in ${SCRIPTS}; do \ |
| 250 | $(INSTALL_SCRIPT) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \ | 253 | $(INSTALL_SCRIPT) ${srcdir}/$$file "$(DESTDIR)${archlibdir}/$$file"; \ |
| 251 | done ; \ | 254 | done ; \ |
| 252 | fi | 255 | fi |
| 253 | 256 | ||
| @@ -257,23 +260,23 @@ $(DESTDIR)${archlibdir}: all | |||
| 257 | install: $(DESTDIR)${archlibdir} | 260 | install: $(DESTDIR)${archlibdir} |
| 258 | @echo | 261 | @echo |
| 259 | @echo "Installing utilities for users to run." | 262 | @echo "Installing utilities for users to run." |
| 260 | umask 022; ${MKDIR_P} $(DESTDIR)${bindir} | 263 | umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}" |
| 261 | for file in ${INSTALLABLES} ; do \ | 264 | for file in ${INSTALLABLES} ; do \ |
| 262 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ | 265 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ |
| 263 | done | 266 | done |
| 264 | for file in ${INSTALLABLE_SCRIPTS} ; do \ | 267 | for file in ${INSTALLABLE_SCRIPTS} ; do \ |
| 265 | $(INSTALL_SCRIPT) ${srcdir}/$${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ | 268 | $(INSTALL_SCRIPT) ${srcdir}/$${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed '$(TRANSFORM)'` ; \ |
| 266 | done | 269 | done |
| 267 | 270 | ||
| 268 | uninstall: | 271 | uninstall: |
| 269 | for file in ${INSTALLABLES}; do \ | 272 | for file in ${INSTALLABLES}; do \ |
| 270 | rm -f $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ | 273 | rm -f "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ |
| 271 | done | 274 | done |
| 272 | for file in ${INSTALLABLE_SCRIPTS}; do \ | 275 | for file in ${INSTALLABLE_SCRIPTS}; do \ |
| 273 | rm -f $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ | 276 | rm -f "$(DESTDIR)${bindir}"/`echo $${file} | sed '$(TRANSFORM)'` ; \ |
| 274 | done | 277 | done |
| 275 | if [ -d $(DESTDIR)${archlibdir} ]; then \ | 278 | if [ -d "$(DESTDIR)${archlibdir}" ]; then \ |
| 276 | (cd $(DESTDIR)${archlibdir} && rm -f ${UTILITIES} ${SCRIPTS}) \ | 279 | (cd "$(DESTDIR)${archlibdir}" && rm -f ${UTILITIES} ${SCRIPTS}) \ |
| 277 | fi | 280 | fi |
| 278 | 281 | ||
| 279 | mostlyclean: | 282 | mostlyclean: |
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 216865c3800..971f74e7fee 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -514,7 +514,7 @@ static char * | |||
| 514 | xstrdup (char *s) | 514 | xstrdup (char *s) |
| 515 | { | 515 | { |
| 516 | if (s) | 516 | if (s) |
| 517 | s = strcpy (xmalloc (strlen (s) + 1), s); | 517 | return strcpy (xmalloc (strlen (s) + 1), s); |
| 518 | return s; | 518 | return s; |
| 519 | } | 519 | } |
| 520 | 520 | ||
diff --git a/lib-src/etags.c b/lib-src/etags.c index aa8c773e357..21cf3654b9e 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -6243,12 +6243,9 @@ savestr (const char *cp) | |||
| 6243 | static char * | 6243 | static char * |
| 6244 | savenstr (const char *cp, int len) | 6244 | savenstr (const char *cp, int len) |
| 6245 | { | 6245 | { |
| 6246 | register char *dp; | 6246 | char *dp = xnew (len + 1, char); |
| 6247 | |||
| 6248 | dp = xnew (len + 1, char); | ||
| 6249 | memcpy (dp, cp, len); | ||
| 6250 | dp[len] = '\0'; | 6247 | dp[len] = '\0'; |
| 6251 | return dp; | 6248 | return memcpy (dp, cp, len); |
| 6252 | } | 6249 | } |
| 6253 | 6250 | ||
| 6254 | /* | 6251 | /* |
| @@ -6362,7 +6359,6 @@ concat (const char *s1, const char *s2, const char *s3) | |||
| 6362 | strcpy (result, s1); | 6359 | strcpy (result, s1); |
| 6363 | strcpy (result + len1, s2); | 6360 | strcpy (result + len1, s2); |
| 6364 | strcpy (result + len1 + len2, s3); | 6361 | strcpy (result + len1 + len2, s3); |
| 6365 | result[len1 + len2 + len3] = '\0'; | ||
| 6366 | 6362 | ||
| 6367 | return result; | 6363 | return result; |
| 6368 | } | 6364 | } |